diff --git a/tests/baselines/reference/abstractProperty.js b/tests/baselines/reference/abstractProperty.js index d9bfd5eb05f..292213ead53 100644 --- a/tests/baselines/reference/abstractProperty.js +++ b/tests/baselines/reference/abstractProperty.js @@ -39,6 +39,7 @@ var C = (function (_super) { _this = _super.apply(this, arguments) || this; _this.raw = "edge"; _this.ro = "readonly please"; + return _this; } Object.defineProperty(C.prototype, "prop", { get: function () { return "foo"; }, diff --git a/tests/baselines/reference/abstractPropertyNegative.js b/tests/baselines/reference/abstractPropertyNegative.js index e94d9492fdb..28ada310ef4 100644 --- a/tests/baselines/reference/abstractPropertyNegative.js +++ b/tests/baselines/reference/abstractPropertyNegative.js @@ -60,6 +60,7 @@ var C = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this.ro = "readonly please"; + return _this; } Object.defineProperty(C.prototype, "concreteWithNoBody", { get: function () { }, @@ -81,6 +82,7 @@ var WrongTypePropertyImpl = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this.num = "nope, wrong"; + return _this; } return WrongTypePropertyImpl; }(WrongTypeProperty)); @@ -108,6 +110,7 @@ var WrongTypeAccessorImpl2 = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this.num = "nope, wrong"; + return _this; } return WrongTypeAccessorImpl2; }(WrongTypeAccessor)); diff --git a/tests/baselines/reference/accessOverriddenBaseClassMember1.js b/tests/baselines/reference/accessOverriddenBaseClassMember1.js index b4c269b1e3b..65431a2f778 100644 --- a/tests/baselines/reference/accessOverriddenBaseClassMember1.js +++ b/tests/baselines/reference/accessOverriddenBaseClassMember1.js @@ -37,6 +37,7 @@ var ColoredPoint = (function (_super) { var _this; _this = _super.call(this, x, y) || this; _this.color = color; + return _this; } ColoredPoint.prototype.toString = function () { return _super.prototype.toString.call(this) + " color=" + this.color; diff --git a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js index 462390d28f7..8af9c702654 100644 --- a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js +++ b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js @@ -68,6 +68,7 @@ var D = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this.x = moduleA; + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/arrowFunctionContexts.js b/tests/baselines/reference/arrowFunctionContexts.js index bfd49be6bbf..660208cb0c1 100644 --- a/tests/baselines/reference/arrowFunctionContexts.js +++ b/tests/baselines/reference/arrowFunctionContexts.js @@ -118,6 +118,7 @@ var Derived = (function (_super) { function Derived() { var _this; _this = _super.call(this, function () { return _this; }) || this; + return _this; } return Derived; }(Base)); @@ -160,6 +161,7 @@ var M2; function Derived() { var _this; _this = _super.call(this, function () { return _this; }) || this; + return _this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/assignmentLHSIsValue.js b/tests/baselines/reference/assignmentLHSIsValue.js index 070c151ee51..52d14cbe536 100644 --- a/tests/baselines/reference/assignmentLHSIsValue.js +++ b/tests/baselines/reference/assignmentLHSIsValue.js @@ -121,6 +121,7 @@ var Derived = (function (_super) { var _this; _this = _super.call(this) || this; _super.prototype. = value; + return _this; } Derived.prototype.foo = function () { _super.prototype. = value; }; Derived.sfoo = function () { _super. = value; }; diff --git a/tests/baselines/reference/autolift4.js b/tests/baselines/reference/autolift4.js index b6afd28d429..0638efab0b3 100644 --- a/tests/baselines/reference/autolift4.js +++ b/tests/baselines/reference/autolift4.js @@ -46,6 +46,7 @@ var Point3D = (function (_super) { var _this; _this = _super.call(this, x, y) || this; _this.z = z; + return _this; } Point3D.prototype.getDist = function () { return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.m); diff --git a/tests/baselines/reference/baseCheck.js b/tests/baselines/reference/baseCheck.js index c3a2731b45d..832830ae864 100644 --- a/tests/baselines/reference/baseCheck.js +++ b/tests/baselines/reference/baseCheck.js @@ -45,6 +45,7 @@ var ELoc = (function (_super) { function ELoc(x) { var _this; _this = _super.call(this, 0, x) || this; + return _this; } return ELoc; }(C)); @@ -53,6 +54,7 @@ var ELocVar = (function (_super) { function ELocVar(x) { var _this; _this = _super.call(this, 0, loc) || this; + return _this; } ELocVar.prototype.m = function () { var loc = 10; @@ -65,6 +67,7 @@ var D = (function (_super) { var _this; _this = _super.call(this, _this.z) || this; _this.z = z; + return _this; } return D; }(C)); // too few params @@ -74,6 +77,7 @@ var E = (function (_super) { var _this; _this = _super.call(this, 0, _this.z) || this; _this.z = z; + return _this; } return E; }(C)); @@ -83,6 +87,7 @@ var F = (function (_super) { var _this; _this = _super.call(this, "hello", _this.z) || this; _this.z = z; + return _this; } return F; }(C)); // first param type diff --git a/tests/baselines/reference/bases.js b/tests/baselines/reference/bases.js index ff6a3262d45..6b73eb9556b 100644 --- a/tests/baselines/reference/bases.js +++ b/tests/baselines/reference/bases.js @@ -39,6 +39,7 @@ var C = (function (_super) { var _this; _this.x; any; + return _this; } return C; }(B)); diff --git a/tests/baselines/reference/bestCommonTypeOfTuple2.js b/tests/baselines/reference/bestCommonTypeOfTuple2.js index 34deb346cbd..8213733b753 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple2.js +++ b/tests/baselines/reference/bestCommonTypeOfTuple2.js @@ -63,6 +63,7 @@ var D1 = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this.i = "bar"; + return _this; } return D1; }(C1)); diff --git a/tests/baselines/reference/callWithSpread.js b/tests/baselines/reference/callWithSpread.js index 2149db744b0..48af58edf65 100644 --- a/tests/baselines/reference/callWithSpread.js +++ b/tests/baselines/reference/callWithSpread.js @@ -102,6 +102,7 @@ var D = (function (_super) { var _this; _this = _super.call(this, 1, 2) || this; _this = _super.apply(this, [1, 2].concat(a)) || this; + return _this; } D.prototype.foo = function () { _super.prototype.foo.call(this, 1, 2); diff --git a/tests/baselines/reference/captureThisInSuperCall.js b/tests/baselines/reference/captureThisInSuperCall.js index 0c36877d9dc..2d39722548d 100644 --- a/tests/baselines/reference/captureThisInSuperCall.js +++ b/tests/baselines/reference/captureThisInSuperCall.js @@ -24,6 +24,7 @@ var B = (function (_super) { function B() { var _this; _this = _super.call(this, { test: function () { return _this.someMethod(); } }) || this; + return _this; } B.prototype.someMethod = function () { }; return B; diff --git a/tests/baselines/reference/checkForObjectTooStrict.js b/tests/baselines/reference/checkForObjectTooStrict.js index 48825a01a67..8c0cfc104d2 100644 --- a/tests/baselines/reference/checkForObjectTooStrict.js +++ b/tests/baselines/reference/checkForObjectTooStrict.js @@ -51,6 +51,7 @@ var Bar = (function (_super) { function Bar() { var _this; _this = _super.call(this) || this; + return _this; } return Bar; }(Foo.Object)); @@ -59,6 +60,7 @@ var Baz = (function (_super) { function Baz() { var _this; _this = _super.call(this) || this; + return _this; } return Baz; }(Object)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js index 35e00c36621..a54f82ab9fa 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js @@ -29,6 +29,7 @@ var Derived = (function (_super) { _this; _this.x = 10; var that = _this; + return _this; } return Derived; }(Based)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js index b49c1aab774..95b34f27b68 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js @@ -29,6 +29,7 @@ var Derived = (function (_super) { _this = _super.call(this) || this; _this.x = 10; var that = _this; + return _this; } return Derived; }(Based)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js index 70600bb03a9..0e882f71fdb 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js @@ -39,6 +39,7 @@ var Derived = (function (_super) { _this = _super.call(this) || this; _this.x = 10; var that = _this; + return _this; } return Derived; }(Based)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js index 95e0062b087..00f2ed22fbf 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js @@ -47,6 +47,7 @@ var Derived = (function (_super) { _this = _super.call(this) || this; _this.x = 10; var that = _this; + return _this; } return Derived; }(Based)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js index 1c77b2e7c78..e365678ee0c 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js @@ -27,6 +27,7 @@ var Derived = (function (_super) { function Derived() { var _this; _this = _super.call(this, _this.x) || this; + return _this; } return Derived; }(Based)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js index 15fcbff4c89..cc8912230ab 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js @@ -31,6 +31,7 @@ var Super = (function (_super) { var _this; (function () { return _this; }); // No Error _this = _super.call(this) || this; + return _this; } return Super; }(Base)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js index 0cade04664d..7ba43de005b 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js @@ -25,6 +25,7 @@ var Super = (function (_super) { function Super() { var _this; _this = _super.call(this, (function () { return _this; })) || this; // No error + return _this; } return Super; }(Base)); diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js index a280c0d6ca6..25a480b9b57 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js @@ -31,6 +31,7 @@ var Super = (function (_super) { var _this; var that = _this; _this = _super.call(this) || this; + return _this; } return Super; }(Base)); diff --git a/tests/baselines/reference/classConstructorAccessibility2.js b/tests/baselines/reference/classConstructorAccessibility2.js index 9d1ebdd9d9a..8a81d469fb8 100644 --- a/tests/baselines/reference/classConstructorAccessibility2.js +++ b/tests/baselines/reference/classConstructorAccessibility2.js @@ -80,6 +80,7 @@ var DerivedA = (function (_super) { var _this; _this = _super.call(this, x) || this; _this.x = x; + return _this; } DerivedA.prototype.createInstance = function () { new DerivedA(5); }; DerivedA.prototype.createBaseInstance = function () { new BaseA(6); }; @@ -92,6 +93,7 @@ var DerivedB = (function (_super) { var _this; _this = _super.call(this, x) || this; _this.x = x; + return _this; } DerivedB.prototype.createInstance = function () { new DerivedB(7); }; DerivedB.prototype.createBaseInstance = function () { new BaseB(8); }; // ok @@ -104,6 +106,7 @@ var DerivedC = (function (_super) { var _this; _this = _super.call(this, x) || this; _this.x = x; + return _this; } DerivedC.prototype.createInstance = function () { new DerivedC(9); }; DerivedC.prototype.createBaseInstance = function () { new BaseC(10); }; // error diff --git a/tests/baselines/reference/classConstructorParametersAccessibility.js b/tests/baselines/reference/classConstructorParametersAccessibility.js index 066c724b60f..214815f4976 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility.js @@ -62,6 +62,7 @@ var Derived = (function (_super) { var _this; _this = _super.call(this, p) || this; _this.p; // OK + return _this; } return Derived; }(C3)); diff --git a/tests/baselines/reference/classConstructorParametersAccessibility2.js b/tests/baselines/reference/classConstructorParametersAccessibility2.js index b8050435171..7c714aa4c03 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility2.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility2.js @@ -62,6 +62,7 @@ var Derived = (function (_super) { var _this; _this = _super.call(this, p) || this; _this.p; // OK + return _this; } return Derived; }(C3)); diff --git a/tests/baselines/reference/classConstructorParametersAccessibility3.js b/tests/baselines/reference/classConstructorParametersAccessibility3.js index 9e0c0264fd9..275f3920538 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility3.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility3.js @@ -32,6 +32,7 @@ var Derived = (function (_super) { _this = _super.call(this, p) || this; _this.p = p; _this.p; // OK + return _this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/classExpression3.js b/tests/baselines/reference/classExpression3.js index e0ba9c349e7..3c53d728233 100644 --- a/tests/baselines/reference/classExpression3.js +++ b/tests/baselines/reference/classExpression3.js @@ -18,6 +18,7 @@ var C = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this.c = 3; + return _this; } return class_1; }((function (_super) { @@ -26,6 +27,7 @@ var C = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this.b = 2; + return _this; } return class_2; }((function () { diff --git a/tests/baselines/reference/classExtendingClassLikeType.js b/tests/baselines/reference/classExtendingClassLikeType.js index 2d91befc172..32d7fff0cbd 100644 --- a/tests/baselines/reference/classExtendingClassLikeType.js +++ b/tests/baselines/reference/classExtendingClassLikeType.js @@ -80,6 +80,7 @@ var D1 = (function (_super) { _this = _super.call(this, "abc", "def") || this; _this.x = "x"; _this.y = "y"; + return _this; } return D1; }(getBase())); @@ -91,6 +92,7 @@ var D2 = (function (_super) { _this = _super.call(this, 10, 20) || this; _this.x = 1; _this.y = 2; + return _this; } return D2; }(getBase())); @@ -101,6 +103,7 @@ var D3 = (function (_super) { _this = _super.call(this, "abc", 42) || this; _this.x = "x"; _this.y = 2; + return _this; } return D3; }(getBase())); diff --git a/tests/baselines/reference/classExtendsNull.js b/tests/baselines/reference/classExtendsNull.js index 3ff1c92a56e..301dee7f705 100644 --- a/tests/baselines/reference/classExtendsNull.js +++ b/tests/baselines/reference/classExtendsNull.js @@ -24,6 +24,7 @@ var C = (function (_super) { var _this; _this = _super.call(this) || this; return Object.create(null); + return _this; } return C; }(null)); @@ -32,6 +33,7 @@ var D = (function (_super) { function D() { var _this; return Object.create(null); + return _this; } return D; }(null)); diff --git a/tests/baselines/reference/classSideInheritance2.js b/tests/baselines/reference/classSideInheritance2.js index c5c506d1af6..1af6b6f846c 100644 --- a/tests/baselines/reference/classSideInheritance2.js +++ b/tests/baselines/reference/classSideInheritance2.js @@ -31,6 +31,7 @@ var SubText = (function (_super) { function SubText(text, span) { var _this; _this = _super.call(this) || this; + return _this; } return SubText; }(TextBase)); diff --git a/tests/baselines/reference/classSideInheritance3.js b/tests/baselines/reference/classSideInheritance3.js index 4751e0e8d6e..fda7b0b0848 100644 --- a/tests/baselines/reference/classSideInheritance3.js +++ b/tests/baselines/reference/classSideInheritance3.js @@ -36,6 +36,7 @@ var B = (function (_super) { var _this; _this = _super.call(this, x) || this; _this.data = data; + return _this; } return B; }(A)); @@ -44,6 +45,7 @@ var C = (function (_super) { function C(x) { var _this; _this = _super.call(this, x) || this; + return _this; } return C; }(A)); diff --git a/tests/baselines/reference/classUpdateTests.js b/tests/baselines/reference/classUpdateTests.js index d334e1c7f66..2d7ecc3c190 100644 --- a/tests/baselines/reference/classUpdateTests.js +++ b/tests/baselines/reference/classUpdateTests.js @@ -160,6 +160,7 @@ var E = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this.p1 = 0; + return _this; } return E; }(D)); @@ -167,6 +168,7 @@ var F = (function (_super) { __extends(F, _super); function F() { var _this; + return _this; } // ERROR - super call required return F; }(E)); @@ -176,6 +178,7 @@ var G = (function (_super) { var _this; _this = _super.call(this) || this; _this.p1 = 0; + return _this; } // NO ERROR return G; }(D)); @@ -190,6 +193,7 @@ var I = (function (_super) { function I() { var _this; _this = _super.call(this) || this; + return _this; } // ERROR - no super call allowed return I; }(Object)); @@ -199,6 +203,7 @@ var J = (function (_super) { var _this; _this = _super.call(this) || this; // NO ERROR _this.p1 = p1; + return _this; } return J; }(G)); @@ -209,6 +214,7 @@ var K = (function (_super) { _this.p1 = p1; var i = 0; _this = _super.call(this) || this; + return _this; } return K; }(G)); @@ -218,6 +224,7 @@ var L = (function (_super) { var _this; _this = _super.call(this) || this; // NO ERROR _this.p1 = p1; + return _this; } return L; }(G)); @@ -228,6 +235,7 @@ var M = (function (_super) { _this.p1 = p1; var i = 0; _this = _super.call(this) || this; + return _this; } return M; }(G)); diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js index b961b8fa4a5..5f2a5e89301 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js @@ -46,6 +46,7 @@ var b = (function (_super) { _this = _super.call(this) || this; function _super() { } + return _this; } return b; }(Foo)); @@ -58,6 +59,7 @@ var c = (function (_super) { function _super() { } }; + return _this; } return c; }(Foo)); diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js index e3d834dd1d4..a6893c6a57a 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js @@ -48,6 +48,7 @@ var b = (function (_super) { } } }; + return _this; } return b; }(Foo)); diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js index b3ef3000762..d799c783503 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js @@ -39,6 +39,7 @@ var b = (function (_super) { var _this; _this = _super.call(this) || this; var _super = 10; // Should be error + return _this; } return b; }(Foo)); @@ -50,6 +51,7 @@ var c = (function (_super) { var x = function () { var _super = 10; // Should be error }; + return _this; } return c; }(Foo)); diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js index e7cb0e613cc..4bb4f6a5a8b 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js @@ -46,6 +46,7 @@ var b = (function (_super) { } }; _this._super = 10; // No error + return _this; } return b; }(Foo)); diff --git a/tests/baselines/reference/collisionSuperAndParameter.js b/tests/baselines/reference/collisionSuperAndParameter.js index a60889888d6..6ed47a1b3c1 100644 --- a/tests/baselines/reference/collisionSuperAndParameter.js +++ b/tests/baselines/reference/collisionSuperAndParameter.js @@ -100,6 +100,7 @@ var Foo2 = (function (_super) { doStuff: function (_super) { } }; + return _this; } Foo2.prototype.x = function () { var _this = this; @@ -126,6 +127,7 @@ var Foo4 = (function (_super) { function Foo4(_super) { var _this; _this = _super.call(this) || this; + return _this; } Foo4.prototype.y = function (_super) { var _this = this; diff --git a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js index 696f439a4b1..2d3709fa878 100644 --- a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js +++ b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js @@ -46,6 +46,7 @@ var b1 = (function (_super) { function b1(_super) { var _this; _this = _super.call(this) || this; + return _this; } return b1; }(a)); @@ -55,6 +56,7 @@ var b2 = (function (_super) { var _this; _this = _super.call(this) || this; _this._super = _super; + return _this; } return b2; }(a)); @@ -63,6 +65,7 @@ var b3 = (function (_super) { function b3(_super) { var _this; _this = _super.call(this) || this; + return _this; } return b3; }(a)); @@ -72,6 +75,7 @@ var b4 = (function (_super) { var _this; _this = _super.call(this) || this; _this._super = _super; + return _this; } return b4; }(a)); diff --git a/tests/baselines/reference/commentsInheritance.js b/tests/baselines/reference/commentsInheritance.js index 860c0b90e48..370ee0d246c 100644 --- a/tests/baselines/reference/commentsInheritance.js +++ b/tests/baselines/reference/commentsInheritance.js @@ -229,6 +229,7 @@ var c3 = (function (_super) { function c3() { var _this; _this = _super.call(this, 10) || this; + return _this; } /** c3 f1*/ c3.prototype.f1 = function () { diff --git a/tests/baselines/reference/compoundAssignmentLHSIsValue.js b/tests/baselines/reference/compoundAssignmentLHSIsValue.js index 2057d63b38f..dfbdf31c3d1 100644 --- a/tests/baselines/reference/compoundAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundAssignmentLHSIsValue.js @@ -201,6 +201,7 @@ var Derived = (function (_super) { _this = _super.call(this) || this; _super.prototype. *= value; _super.prototype. += value; + return _this; } Derived.prototype.foo = function () { _super.prototype. *= value; diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js index ef29163eda6..da670472b47 100644 --- a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js @@ -143,6 +143,7 @@ var Derived = (function (_super) { _this = _super.call(this) || this; (_a = _super.prototype). = Math.pow(_a., value); var _a; + return _this; } Derived.prototype.foo = function () { (_a = _super.prototype). = Math.pow(_a., value); diff --git a/tests/baselines/reference/computedPropertyNames28_ES5.js b/tests/baselines/reference/computedPropertyNames28_ES5.js index aaac258504c..8152394cbf8 100644 --- a/tests/baselines/reference/computedPropertyNames28_ES5.js +++ b/tests/baselines/reference/computedPropertyNames28_ES5.js @@ -29,6 +29,7 @@ var C = (function (_super) { var obj = (_a = {}, _a[(_this = _super.call(this) || this, "prop")] = function () { }, _a); + return _this; var _a; } return C; diff --git a/tests/baselines/reference/computedPropertyNames30_ES5.js b/tests/baselines/reference/computedPropertyNames30_ES5.js index 9fbe5f380ca..9f4a4ab51f9 100644 --- a/tests/baselines/reference/computedPropertyNames30_ES5.js +++ b/tests/baselines/reference/computedPropertyNames30_ES5.js @@ -40,6 +40,7 @@ var C = (function (_super) { _a); var _a; }); + return _this; } return C; }(Base)); diff --git a/tests/baselines/reference/constructorArgs.js b/tests/baselines/reference/constructorArgs.js index 2c2838c97f9..c7939472a96 100644 --- a/tests/baselines/reference/constructorArgs.js +++ b/tests/baselines/reference/constructorArgs.js @@ -32,6 +32,7 @@ var Sub = (function (_super) { var _this; _this = _super.call(this, options.value) || this; _this.options = options; + return _this; } return Sub; }(Super)); diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js index a235e2555f3..4f70c7d7f35 100644 --- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js @@ -49,6 +49,7 @@ var Derived = (function (_super) { function Derived(x) { var _this; _this = _super.call(this, x) || this; + return _this; } return Derived; }(Base)); @@ -59,6 +60,7 @@ var Derived2 = (function (_super) { var _this; _this = _super.call(this, x) || this; return 1; + return _this; } return Derived2; }(Base)); diff --git a/tests/baselines/reference/constructorOverloads2.js b/tests/baselines/reference/constructorOverloads2.js index a0ed6d890d4..0041acb489e 100644 --- a/tests/baselines/reference/constructorOverloads2.js +++ b/tests/baselines/reference/constructorOverloads2.js @@ -42,6 +42,7 @@ var Foo = (function (_super) { function Foo(x, y) { var _this; _this = _super.call(this, x) || this; + return _this; } Foo.prototype.bar1 = function () { }; return Foo; diff --git a/tests/baselines/reference/constructorOverloads3.js b/tests/baselines/reference/constructorOverloads3.js index 7bc7989f7a3..c0ae9b452f9 100644 --- a/tests/baselines/reference/constructorOverloads3.js +++ b/tests/baselines/reference/constructorOverloads3.js @@ -32,6 +32,7 @@ var Foo = (function (_super) { __extends(Foo, _super); function Foo(x, y) { var _this; + return _this; } Foo.prototype.bar1 = function () { }; return Foo; diff --git a/tests/baselines/reference/declFileGenericType2.js b/tests/baselines/reference/declFileGenericType2.js index 50280b589b3..0e5351e69ea 100644 --- a/tests/baselines/reference/declFileGenericType2.js +++ b/tests/baselines/reference/declFileGenericType2.js @@ -60,6 +60,7 @@ var templa; function AbstractElementController() { var _this; _this = _super.call(this) || this; + return _this; } return AbstractElementController; }(templa.mvc.AbstractController)); @@ -82,6 +83,7 @@ var templa; var _this; _this = _super.call(this) || this; _this._controllers = []; + return _this; } return AbstractCompositeElementController; }(templa.dom.mvc.AbstractElementController)); diff --git a/tests/baselines/reference/decoratorOnClassConstructor2.js b/tests/baselines/reference/decoratorOnClassConstructor2.js index d50912fbeac..1f0b9b0d517 100644 --- a/tests/baselines/reference/decoratorOnClassConstructor2.js +++ b/tests/baselines/reference/decoratorOnClassConstructor2.js @@ -47,6 +47,7 @@ var C = (function (_super) { function C(prop) { var _this; _this = _super.call(this) || this; + return _this; } return C; }(_0_ts_1.base)); diff --git a/tests/baselines/reference/decoratorOnClassConstructor3.js b/tests/baselines/reference/decoratorOnClassConstructor3.js index 6f37ad9dea1..9182cce66f4 100644 --- a/tests/baselines/reference/decoratorOnClassConstructor3.js +++ b/tests/baselines/reference/decoratorOnClassConstructor3.js @@ -50,6 +50,7 @@ var C = (function (_super) { function C(prop) { var _this; _this = _super.call(this) || this; + return _this; } return C; }(_0_1.base)); diff --git a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js index 58903b2ba57..e76f3445c8e 100644 --- a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js +++ b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js @@ -48,6 +48,7 @@ var Derived = (function (_super) { __extends(Derived, _super); function Derived() { var _this; + return _this; } return Derived; }(Base)); @@ -61,6 +62,7 @@ var Derived2 = (function (_super) { function Derived2() { var _this; var r2 = function () { return _this = _super.call(this) || this; }; // error for misplaced super call (nested function) + return _this; } return Derived2; }(Base2)); @@ -69,6 +71,7 @@ var Derived3 = (function (_super) { function Derived3() { var _this; var r = function () { _this = _super.call(this) || this; }; // error + return _this; } return Derived3; }(Base2)); @@ -77,6 +80,7 @@ var Derived4 = (function (_super) { function Derived4() { var _this; var r = _this = _super.call(this) || this; // ok + return _this; } return Derived4; }(Base2)); diff --git a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js index 605ad6afa45..fd601ff2211 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js +++ b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js @@ -34,6 +34,7 @@ var DerivedClass = (function (_super) { function DerivedClass() { var _this; _this = _super.call(this) || this; + return _this; } DerivedClass.prototype._init = function () { }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js index d3e3fe5d4c9..12344c19915 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js @@ -68,6 +68,7 @@ var Derived = (function (_super) { function Derived(a) { var _this; _this = _super.call(this, x) || this; + return _this; } Derived.prototype.b = function (a) { }; Object.defineProperty(Derived.prototype, "c", { diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js index 1f43469596a..37be9e209ac 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js @@ -96,6 +96,7 @@ var Derived = (function (_super) { function Derived(a) { var _this; _this = _super.call(this, a) || this; + return _this; } Derived.prototype.b = function (a) { }; Object.defineProperty(Derived.prototype, "c", { diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js index d678f5ce59f..0836c9d7f41 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js @@ -105,6 +105,7 @@ var Derived1 = (function (_super) { function Derived1(a) { var _this; _this = _super.call(this, a) || this; + return _this; } return Derived1; }(Base)); @@ -113,6 +114,7 @@ var Derived2 = (function (_super) { function Derived2(a) { var _this; _this = _super.call(this, a) || this; + return _this; } Derived2.prototype.b = function (a) { }; return Derived2; @@ -122,6 +124,7 @@ var Derived3 = (function (_super) { function Derived3(a) { var _this; _this = _super.call(this, a) || this; + return _this; } Object.defineProperty(Derived3.prototype, "c", { get: function () { return x; }, @@ -135,6 +138,7 @@ var Derived4 = (function (_super) { function Derived4(a) { var _this; _this = _super.call(this, a) || this; + return _this; } Object.defineProperty(Derived4.prototype, "c", { set: function (v) { }, @@ -148,6 +152,7 @@ var Derived5 = (function (_super) { function Derived5(a) { var _this; _this = _super.call(this, a) || this; + return _this; } return Derived5; }(Base)); @@ -156,6 +161,7 @@ var Derived6 = (function (_super) { function Derived6(a) { var _this; _this = _super.call(this, a) || this; + return _this; } return Derived6; }(Base)); @@ -164,6 +170,7 @@ var Derived7 = (function (_super) { function Derived7(a) { var _this; _this = _super.call(this, a) || this; + return _this; } Derived7.s = function (a) { }; return Derived7; @@ -173,6 +180,7 @@ var Derived8 = (function (_super) { function Derived8(a) { var _this; _this = _super.call(this, a) || this; + return _this; } Object.defineProperty(Derived8, "t", { get: function () { return x; }, @@ -186,6 +194,7 @@ var Derived9 = (function (_super) { function Derived9(a) { var _this; _this = _super.call(this, a) || this; + return _this; } Object.defineProperty(Derived9, "t", { set: function (v) { }, @@ -199,6 +208,7 @@ var Derived10 = (function (_super) { function Derived10(a) { var _this; _this = _super.call(this, a) || this; + return _this; } return Derived10; }(Base)); diff --git a/tests/baselines/reference/derivedClassOverridesPublicMembers.js b/tests/baselines/reference/derivedClassOverridesPublicMembers.js index 7839398551d..8d0375ab13a 100644 --- a/tests/baselines/reference/derivedClassOverridesPublicMembers.js +++ b/tests/baselines/reference/derivedClassOverridesPublicMembers.js @@ -94,6 +94,7 @@ var Derived = (function (_super) { function Derived(a) { var _this; _this = _super.call(this, x) || this; + return _this; } Derived.prototype.b = function (a) { }; Object.defineProperty(Derived.prototype, "c", { diff --git a/tests/baselines/reference/derivedClassParameterProperties.js b/tests/baselines/reference/derivedClassParameterProperties.js index 658e56fb098..f623653d6fa 100644 --- a/tests/baselines/reference/derivedClassParameterProperties.js +++ b/tests/baselines/reference/derivedClassParameterProperties.js @@ -112,6 +112,7 @@ var Derived = (function (_super) { var _this; var a = 1; _this = _super.call(this) || this; // ok + return _this; } return Derived; }(Base)); @@ -122,6 +123,7 @@ var Derived2 = (function (_super) { _this.y = y; var a = 1; _this = _super.call(this) || this; // error + return _this; } return Derived2; }(Base)); @@ -132,6 +134,7 @@ var Derived3 = (function (_super) { _this = _super.call(this) || this; // ok _this.y = y; var a = 1; + return _this; } return Derived3; }(Base)); @@ -142,6 +145,7 @@ var Derived4 = (function (_super) { _this.a = 1; var b = 2; _this = _super.call(this) || this; // error + return _this; } return Derived4; }(Base)); @@ -152,6 +156,7 @@ var Derived5 = (function (_super) { _this = _super.call(this) || this; // ok _this.a = 1; var b = 2; + return _this; } return Derived5; }(Base)); @@ -162,6 +167,7 @@ var Derived6 = (function (_super) { _this.a = 1; var b = 2; _this = _super.call(this) || this; // error: "super" has to be called before "this" accessing + return _this; } return Derived6; }(Base)); @@ -173,6 +179,7 @@ var Derived7 = (function (_super) { _this.a = 3; _this.b = 3; _this = _super.call(this) || this; // error + return _this; } return Derived7; }(Base)); @@ -184,6 +191,7 @@ var Derived8 = (function (_super) { _this.a = 1; _this.a = 3; _this.b = 3; + return _this; } return Derived8; }(Base)); @@ -201,6 +209,7 @@ var Derived9 = (function (_super) { _this.a = 3; _this.b = 3; _this = _super.call(this) || this; // error + return _this; } return Derived9; }(Base2)); @@ -212,6 +221,7 @@ var Derived10 = (function (_super) { _this.a = 1; _this.a = 3; _this.b = 3; + return _this; } return Derived10; }(Base2)); diff --git a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js index 6b06204b8e9..e3bbf2699c5 100644 --- a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js +++ b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js @@ -49,6 +49,7 @@ var Derived = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this.a = _this = _super.call(this) || this; + return _this; } Derived.prototype.b = function () { _this = _super.call(this) || this; diff --git a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js index e73d0041206..102944889bd 100644 --- a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js +++ b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js @@ -44,6 +44,7 @@ var Derived = (function (_super) { function Derived() { var _this; _this = _super.call(this, _this) || this; // ok + return _this; } return Derived; }(Base)); @@ -53,6 +54,7 @@ var Derived2 = (function (_super) { var _this; _this = _super.call(this, _this) || this; // error _this.a = a; + return _this; } return Derived2; }(Base)); @@ -62,6 +64,7 @@ var Derived3 = (function (_super) { var _this; _this = _super.call(this, function () { return _this; }) || this; // error _this.a = a; + return _this; } return Derived3; }(Base)); @@ -71,6 +74,7 @@ var Derived4 = (function (_super) { var _this; _this = _super.call(this, function () { return this; }) || this; // ok _this.a = a; + return _this; } return Derived4; }(Base)); diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js index cc260f09499..f5eb3d22360 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js @@ -45,6 +45,7 @@ var Derived = (function (_super) { _this = _super.apply(this, arguments) || this; _this.x = 1; _this.y = 'hello'; + return _this; } return Derived; }(Base)); @@ -63,6 +64,7 @@ var D = (function (_super) { _this = _super.apply(this, arguments) || this; _this.x = 2; _this.y = null; + return _this; } return D; }(Base2)); diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js index d3711ec27c0..5ad20389230 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js @@ -53,6 +53,7 @@ var Derived = (function (_super) { _this = _super.apply(this, arguments) || this; _this.x = 1; _this.y = 'hello'; + return _this; } return Derived; }(Base)); @@ -73,6 +74,7 @@ var D = (function (_super) { _this = _super.apply(this, arguments) || this; _this.x = 2; _this.y = null; + return _this; } return D; }(Base2)); diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js index 14f9fdf88af..d0e5f22d4f3 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js @@ -67,6 +67,7 @@ var Derived = (function (_super) { _this = _super.call(this, 2) || this; _this.b = ''; _this.b = y; + return _this; } return Derived; }(Base)); @@ -77,6 +78,7 @@ var Derived2 = (function (_super) { _this = _super.apply(this, arguments) || this; _this.x = 1; _this.y = 'hello'; + return _this; } return Derived2; }(Derived)); @@ -96,6 +98,7 @@ var D = (function (_super) { _this = _super.call(this, 2) || this; _this.b = null; _this.b = y; + return _this; } return D; }(Base)); @@ -106,6 +109,7 @@ var D2 = (function (_super) { _this = _super.apply(this, arguments) || this; _this.x = 2; _this.y = null; + return _this; } return D2; }(D)); diff --git a/tests/baselines/reference/destructuringParameterDeclaration5.js b/tests/baselines/reference/destructuringParameterDeclaration5.js index a1f109ed49e..8c35b9044a1 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration5.js +++ b/tests/baselines/reference/destructuringParameterDeclaration5.js @@ -67,6 +67,7 @@ var SubClass = (function (_super) { function SubClass() { var _this; _this = _super.call(this) || this; + return _this; } return SubClass; }(Class)); @@ -80,6 +81,7 @@ var SubD = (function (_super) { function SubD() { var _this; _this = _super.call(this) || this; + return _this; } return SubD; }(D)); diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js index 60fa8e32c1e..b95263464a7 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js @@ -33,6 +33,7 @@ var B = (function (_super) { 'someStringForEgngInject'; _this = _super.call(this) || this; _this.x = x; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js index abef8394924..f078c448b75 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js @@ -35,6 +35,7 @@ var B = (function (_super) { 'someStringForEgngInject'; _this = _super.call(this) || this; _this.blub = 12; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js index 0f36d9d9115..e64af9ef862 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js @@ -34,6 +34,7 @@ var B = (function (_super) { _this = _super.call(this) || this; _this.x = x; _this.blah = 2; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/errorSuperCalls.js b/tests/baselines/reference/errorSuperCalls.js index 4f54781deb9..864bc19a344 100644 --- a/tests/baselines/reference/errorSuperCalls.js +++ b/tests/baselines/reference/errorSuperCalls.js @@ -135,6 +135,7 @@ var Derived = (function (_super) { var _this; _super.prototype..call(_this); _this = _super.call(this) || this; + return _this; } return Derived; }(Base)); @@ -150,6 +151,7 @@ var OtherDerived = (function (_super) { _this = _super.apply(this, arguments) || this; //super call in class member initializer of derived type _this.t = _this = _super.call(this) || this; + return _this; } OtherDerived.prototype.fn = function () { //super call in class member function of derived type diff --git a/tests/baselines/reference/errorSuperPropertyAccess.js b/tests/baselines/reference/errorSuperPropertyAccess.js index 18c98868e93..1b7c9a418fc 100644 --- a/tests/baselines/reference/errorSuperPropertyAccess.js +++ b/tests/baselines/reference/errorSuperPropertyAccess.js @@ -189,6 +189,7 @@ var SomeDerived1 = (function (_super) { var _this; _this = _super.call(this) || this; _super.prototype.publicMember = 1; + return _this; } SomeDerived1.prototype.fn = function () { var x = _super.prototype.publicMember; @@ -223,6 +224,7 @@ var SomeDerived2 = (function (_super) { var _this; _this = _super.call(this) || this; _super.prototype.privateMember = 1; + return _this; } SomeDerived2.prototype.fn = function () { var x = _super.prototype.privateMember; diff --git a/tests/baselines/reference/es6ClassSuperCodegenBug.js b/tests/baselines/reference/es6ClassSuperCodegenBug.js index 88000a12bbe..2eec250211e 100644 --- a/tests/baselines/reference/es6ClassSuperCodegenBug.js +++ b/tests/baselines/reference/es6ClassSuperCodegenBug.js @@ -35,6 +35,7 @@ var B = (function (_super) { else { _this = _super.call(this, 'a2', 'b2') || this; } + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/es6ClassTest.js b/tests/baselines/reference/es6ClassTest.js index 4b2cb2c51b5..705915812be 100644 --- a/tests/baselines/reference/es6ClassTest.js +++ b/tests/baselines/reference/es6ClassTest.js @@ -111,6 +111,7 @@ var Foo = (function (_super) { _this.zoo = "zoo"; _this.x = x; _this.gar = 5; + return _this; } Foo.prototype.bar = function () { return 0; }; Foo.prototype.boo = function (x) { return x; }; diff --git a/tests/baselines/reference/es6ClassTest2.js b/tests/baselines/reference/es6ClassTest2.js index ebf779f7bba..eec5d830e01 100644 --- a/tests/baselines/reference/es6ClassTest2.js +++ b/tests/baselines/reference/es6ClassTest2.js @@ -269,6 +269,7 @@ var SuperChild = (function (_super) { function SuperChild() { var _this; _this = _super.call(this, 1) || this; + return _this; } SuperChild.prototype.b = function () { _super.prototype.b.call(this, 'str'); diff --git a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js index 0cc1f5867a2..ccbac1d22b5 100644 --- a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js +++ b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js @@ -111,6 +111,7 @@ var PortalFx; function Validator(message) { var _this; _this = _super.call(this, message) || this; + return _this; } return Validator; }(Portal.Controls.Validators.Validator)); diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js index 4581ecc31ec..246b9b76e3c 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js @@ -54,6 +54,7 @@ var EndGate; function NumberTween(from) { var _this; _this = _super.call(this, from) || this; + return _this; } return NumberTween; }(Tweening.Tween)); diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js index 8f1e9c8365f..e7744b28833 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js @@ -53,6 +53,7 @@ var EndGate; function NumberTween(from) { var _this; _this = _super.call(this, from) || this; + return _this; } return NumberTween; }(Tweening.Tween)); diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js index 49109e1aa5a..d22823b9f81 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js @@ -62,6 +62,7 @@ var TypeScript; var _this; _this = _super.apply(this, arguments) || this; _this._elementType = null; + return _this; } PullTypeSymbol.prototype.toString = function (scopeSymbol, useConstraintInName) { var s = this.getScopedNameEx(scopeSymbol, useConstraintInName).toString(); diff --git a/tests/baselines/reference/genericTypeConstraints.js b/tests/baselines/reference/genericTypeConstraints.js index 761220ae11a..48ff00e5ac2 100644 --- a/tests/baselines/reference/genericTypeConstraints.js +++ b/tests/baselines/reference/genericTypeConstraints.js @@ -40,6 +40,7 @@ var BarExtended = (function (_super) { function BarExtended() { var _this; _this = _super.call(this) || this; + return _this; } return BarExtended; }(Bar)); diff --git a/tests/baselines/reference/illegalSuperCallsInConstructor.js b/tests/baselines/reference/illegalSuperCallsInConstructor.js index 77f0a0a2b6b..868d53daad5 100644 --- a/tests/baselines/reference/illegalSuperCallsInConstructor.js +++ b/tests/baselines/reference/illegalSuperCallsInConstructor.js @@ -47,6 +47,7 @@ var Derived = (function (_super) { _this = _super.call(this) || this; } }; + return _this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js index 3f205640f59..51c64f48f6c 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js @@ -43,6 +43,7 @@ var D = (function (_super) { _this = _super.apply(this, arguments) || this; _this.x = 2; _this.y = 3; + return _this; } D.prototype.foo = function (x) { return x; }; D.prototype.other = function (x) { return x; }; @@ -55,6 +56,7 @@ var D2 = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this.x = ""; + return _this; } D2.prototype.foo = function (x) { return x; }; D2.prototype.other = function (x) { return x; }; diff --git a/tests/baselines/reference/lift.js b/tests/baselines/reference/lift.js index bfbf75b1731..a71f1c9065a 100644 --- a/tests/baselines/reference/lift.js +++ b/tests/baselines/reference/lift.js @@ -36,6 +36,7 @@ var C = (function (_super) { _this = _super.call(this, y) || this; var x = 10 + w; var ll = x * w; + return _this; } C.prototype.liftxyz = function () { return x + z + this.y; }; C.prototype.liftxylocllz = function () { return x + z + this.y + this.ll; }; diff --git a/tests/baselines/reference/missingPropertiesOfClassExpression.js b/tests/baselines/reference/missingPropertiesOfClassExpression.js index c1f4480241c..20252f37e61 100644 --- a/tests/baselines/reference/missingPropertiesOfClassExpression.js +++ b/tests/baselines/reference/missingPropertiesOfClassExpression.js @@ -17,6 +17,7 @@ var George = (function (_super) { function George() { var _this; _this = _super.call(this) || this; + return _this; } return George; }((function () { diff --git a/tests/baselines/reference/objectCreationOfElementAccessExpression.js b/tests/baselines/reference/objectCreationOfElementAccessExpression.js index 9543082fbd1..760454dd9a4 100644 --- a/tests/baselines/reference/objectCreationOfElementAccessExpression.js +++ b/tests/baselines/reference/objectCreationOfElementAccessExpression.js @@ -84,6 +84,7 @@ var MonsterFood = (function (_super) { var _this; _this = _super.call(this, name) || this; _this.flavor = flavor; + return _this; } return MonsterFood; }(Food)); @@ -93,6 +94,7 @@ var IceCream = (function (_super) { var _this; _this = _super.call(this, "Ice Cream", flavor) || this; _this.flavor = flavor; + return _this; } return IceCream; }(MonsterFood)); @@ -103,6 +105,7 @@ var Cookie = (function (_super) { _this = _super.call(this, "Cookie", flavor) || this; _this.flavor = flavor; _this.isGlutenFree = isGlutenFree; + return _this; } return Cookie; }(MonsterFood)); @@ -112,6 +115,7 @@ var PetFood = (function (_super) { var _this; _this = _super.call(this, name) || this; _this.whereToBuy = whereToBuy; + return _this; } return PetFood; }(Food)); @@ -121,6 +125,7 @@ var ExpensiveOrganicDogFood = (function (_super) { var _this; _this = _super.call(this, "Origen", whereToBuy) || this; _this.whereToBuy = whereToBuy; + return _this; } return ExpensiveOrganicDogFood; }(PetFood)); @@ -131,6 +136,7 @@ var ExpensiveOrganicCatFood = (function (_super) { _this = _super.call(this, "Nature's Logic", whereToBuy) || this; _this.whereToBuy = whereToBuy; _this.containsFish = containsFish; + return _this; } return ExpensiveOrganicCatFood; }(PetFood)); diff --git a/tests/baselines/reference/optionalMethods.js b/tests/baselines/reference/optionalMethods.js index 1885c419fef..72df561227f 100644 --- a/tests/baselines/reference/optionalMethods.js +++ b/tests/baselines/reference/optionalMethods.js @@ -112,6 +112,7 @@ var Derived = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this.a = 1; + return _this; } Derived.prototype.f = function () { return 1; }; return Derived; diff --git a/tests/baselines/reference/optionalParamArgsTest.js b/tests/baselines/reference/optionalParamArgsTest.js index f53f0c74a54..258f05cbc85 100644 --- a/tests/baselines/reference/optionalParamArgsTest.js +++ b/tests/baselines/reference/optionalParamArgsTest.js @@ -164,6 +164,7 @@ var C2 = (function (_super) { var _this; if (v2 === void 0) { v2 = 6; } _this = _super.call(this, v2) || this; + return _this; } return C2; }(C1)); diff --git a/tests/baselines/reference/optionalParameterProperty.js b/tests/baselines/reference/optionalParameterProperty.js index 44eb2a7aa56..ca78ad7286e 100644 --- a/tests/baselines/reference/optionalParameterProperty.js +++ b/tests/baselines/reference/optionalParameterProperty.js @@ -28,6 +28,7 @@ var D = (function (_super) { var _this; _this = _super.call(this) || this; _this.p = p; + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks4.js b/tests/baselines/reference/overloadOnConstConstraintChecks4.js index 22bacbdb0b4..360b38ce70c 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks4.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks4.js @@ -30,6 +30,7 @@ var A = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this.x = 1; + return _this; } return A; }(Z)); diff --git a/tests/baselines/reference/parserAstSpans1.js b/tests/baselines/reference/parserAstSpans1.js index 365e640c150..799a17d47de 100644 --- a/tests/baselines/reference/parserAstSpans1.js +++ b/tests/baselines/reference/parserAstSpans1.js @@ -321,6 +321,7 @@ var c3 = (function (_super) { var _this; _this = _super.call(this, 10) || this; _this.p1 = _super.prototype.c2_p1; + return _this; } /** c3 f1*/ c3.prototype.f1 = function () { @@ -409,6 +410,7 @@ var c6 = (function (_super) { var _this; _this = _super.call(this) || this; _this.d = _super.prototype.b; + return _this; } return c6; }(c5)); diff --git a/tests/baselines/reference/parserRealSource10.js b/tests/baselines/reference/parserRealSource10.js index c9f011704d0..88516c9a692 100644 --- a/tests/baselines/reference/parserRealSource10.js +++ b/tests/baselines/reference/parserRealSource10.js @@ -830,6 +830,7 @@ var TypeScript; _this = _super.call(this, TokenID.NumberLiteral) || this; _this.value = value; _this.hasEmptyFraction = hasEmptyFraction; + return _this; } NumberLiteralToken.prototype.getText = function () { return this.hasEmptyFraction ? this.value.toString() + ".0" : this.value.toString(); @@ -846,6 +847,7 @@ var TypeScript; var _this; _this = _super.call(this, TokenID.StringLiteral) || this; _this.value = value; + return _this; } StringLiteralToken.prototype.getText = function () { return this.value; @@ -863,6 +865,7 @@ var TypeScript; _this = _super.call(this, TokenID.Identifier) || this; _this.value = value; _this.hasEscapeSequence = hasEscapeSequence; + return _this; } IdentifierToken.prototype.getText = function () { return this.value; @@ -879,6 +882,7 @@ var TypeScript; var _this; _this = _super.call(this, tokenId) || this; _this.value = value; + return _this; } WhitespaceToken.prototype.getText = function () { return this.value; @@ -899,6 +903,7 @@ var TypeScript; _this.startPos = startPos; _this.line = line; _this.endsLine = endsLine; + return _this; } CommentToken.prototype.getText = function () { return this.value; @@ -915,6 +920,7 @@ var TypeScript; var _this; _this = _super.call(this, TokenID.RegularExpressionLiteral) || this; _this.regex = regex; + return _this; } RegularExpressionLiteralToken.prototype.getText = function () { return this.regex.toString(); diff --git a/tests/baselines/reference/parserRealSource11.js b/tests/baselines/reference/parserRealSource11.js index 054608e9d19..fa112e51dad 100644 --- a/tests/baselines/reference/parserRealSource11.js +++ b/tests/baselines/reference/parserRealSource11.js @@ -2396,6 +2396,7 @@ var TypeScript; _this.preComments = null; _this.postComments = null; _this.isParenthesized = false; + return _this; } AST.prototype.isExpression = function () { return false; }; AST.prototype.isStatementOrExpression = function () { return false; }; @@ -2547,6 +2548,7 @@ var TypeScript; _this = _super.call(this, NodeType.Error) || this; _this.minChar = min; _this.limChar = lim; + return _this; } return IncompleteAST; }(AST)); @@ -2558,6 +2560,7 @@ var TypeScript; _this = _super.call(this, NodeType.List) || this; _this.enclosingScope = null; _this.members = new AST[]; + return _this; } ASTList.prototype.addToControlFlow = function (context) { var len = this.members.length; @@ -2629,6 +2632,7 @@ var TypeScript; _this.sym = null; _this.cloId = -1; _this.setText(actualText, hasEscapeSequence); + return _this; } Identifier.prototype.setText = function (actualText, hasEscapeSequence) { this.actualText = actualText; @@ -2669,6 +2673,7 @@ var TypeScript; function MissingIdentifier() { var _this; _this = _super.call(this, "__missing") || this; + return _this; } MissingIdentifier.prototype.isMissing = function () { return true; @@ -2685,6 +2690,7 @@ var TypeScript; var _this; _this = _super.call(this, NodeType.Label) || this; _this.id = id; + return _this; } Label.prototype.printLabel = function () { return this.id.actualText + ":"; }; Label.prototype.typeCheck = function (typeFlow) { @@ -2709,6 +2715,7 @@ var TypeScript; function Expression(nodeType) { var _this; _this = _super.call(this, nodeType) || this; + return _this; } Expression.prototype.isExpression = function () { return true; }; Expression.prototype.isStatementOrExpression = function () { return true; }; @@ -2723,6 +2730,7 @@ var TypeScript; _this.operand = operand; _this.targetType = null; // Target type for an object literal (null if no target type) _this.castTerm = null; + return _this; } UnaryExpression.prototype.addToControlFlow = function (context) { _super.prototype.addToControlFlow.call(this, context); @@ -2869,6 +2877,7 @@ var TypeScript; _this.arguments = arguments; _this.signature = null; _this.minChar = _this.target.minChar; + return _this; } CallExpression.prototype.typeCheck = function (typeFlow) { if (this.nodeType == NodeType.New) { @@ -2900,6 +2909,7 @@ var TypeScript; _this = _super.call(this, nodeType) || this; _this.operand1 = operand1; _this.operand2 = operand2; + return _this; } BinaryExpression.prototype.typeCheck = function (typeFlow) { switch (this.nodeType) { @@ -3054,6 +3064,7 @@ var TypeScript; _this.operand1 = operand1; _this.operand2 = operand2; _this.operand3 = operand3; + return _this; } ConditionalExpression.prototype.typeCheck = function (typeFlow) { return typeFlow.typeCheckQMark(this); @@ -3080,6 +3091,7 @@ var TypeScript; _this.value = value; _this.hasEmptyFraction = hasEmptyFraction; _this.isNegativeZero = false; + return _this; } NumberLiteral.prototype.typeCheck = function (typeFlow) { this.type = typeFlow.doubleType; @@ -3120,6 +3132,7 @@ var TypeScript; var _this; _this = _super.call(this, NodeType.Regex) || this; _this.regex = regex; + return _this; } RegexLiteral.prototype.typeCheck = function (typeFlow) { this.type = typeFlow.regexType; @@ -3141,6 +3154,7 @@ var TypeScript; var _this; _this = _super.call(this, NodeType.QString) || this; _this.text = text; + return _this; } StringLiteral.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); @@ -3167,6 +3181,7 @@ var TypeScript; function ModuleElement(nodeType) { var _this; _this = _super.call(this, nodeType) || this; + return _this; } return ModuleElement; }(AST)); @@ -3180,6 +3195,7 @@ var TypeScript; _this.alias = alias; _this.varFlags = VarFlags.None; _this.isDynamicImport = false; + return _this; } ImportDeclaration.prototype.isStatementOrExpression = function () { return true; }; ImportDeclaration.prototype.emit = function (emitter, tokenId, startLine) { @@ -3242,6 +3258,7 @@ var TypeScript; _this.typeExpr = null; _this.varFlags = VarFlags.None; _this.sym = null; + return _this; } BoundDecl.prototype.isStatementOrExpression = function () { return true; }; BoundDecl.prototype.isPrivate = function () { return hasFlag(this.varFlags, VarFlags.Private); }; @@ -3261,6 +3278,7 @@ var TypeScript; function VarDecl(id, nest) { var _this; _this = _super.call(this, id, NodeType.VarDecl, nest) || this; + return _this; } VarDecl.prototype.isAmbient = function () { return hasFlag(this.varFlags, VarFlags.Ambient); }; VarDecl.prototype.isExported = function () { return hasFlag(this.varFlags, VarFlags.Exported); }; @@ -3281,6 +3299,7 @@ var TypeScript; _this = _super.call(this, id, NodeType.ArgDecl, 0) || this; _this.isOptional = false; _this.parameterPropertySym = null; + return _this; } ArgDecl.prototype.isOptionalArg = function () { return this.isOptional || this.init; }; ArgDecl.prototype.treeViewLabel = function () { @@ -3331,6 +3350,7 @@ var TypeScript; _this.returnStatementsWithExpressions = []; _this.scopeType = null; // Type of the FuncDecl, before target typing _this.endingToken = null; + return _this; } FuncDecl.prototype.internalName = function () { if (this.internalNameCache == null) { @@ -3458,6 +3478,7 @@ var TypeScript; _this.containsUnicodeCharInComment = false; _this.vars = vars; _this.scopes = scopes; + return _this; } Script.prototype.typeCheck = function (typeFlow) { return typeFlow.typeCheckScript(this); @@ -3517,6 +3538,7 @@ var TypeScript; _this.members = members; _this.leftCurlyCount = 0; _this.rightCurlyCount = 0; + return _this; } return NamedDeclaration; }(ModuleElement)); @@ -3535,6 +3557,7 @@ var TypeScript; _this.vars = vars; _this.scopes = scopes; _this.prettyName = _this.name.actualText; + return _this; } ModuleDeclaration.prototype.isExported = function () { return hasFlag(this.modFlags, ModuleFlags.Exported); }; ModuleDeclaration.prototype.isAmbient = function () { return hasFlag(this.modFlags, ModuleFlags.Ambient); }; @@ -3565,6 +3588,7 @@ var TypeScript; _this.extendsList = extendsList; _this.implementsList = implementsList; _this.varFlags = VarFlags.None; + return _this; } TypeDeclaration.prototype.isExported = function () { return hasFlag(this.varFlags, VarFlags.Exported); @@ -3584,6 +3608,7 @@ var TypeScript; _this.constructorDecl = null; _this.constructorNestingLevel = 0; _this.endingToken = null; + return _this; } ClassDeclaration.prototype.typeCheck = function (typeFlow) { return typeFlow.typeCheckClass(this); @@ -3599,6 +3624,7 @@ var TypeScript; function InterfaceDeclaration(name, members, extendsList, implementsList) { var _this; _this = _super.call(this, NodeType.InterfaceDeclaration, name, extendsList, implementsList, members) || this; + return _this; } InterfaceDeclaration.prototype.typeCheck = function (typeFlow) { return typeFlow.typeCheckInterface(this); @@ -3614,6 +3640,7 @@ var TypeScript; var _this; _this = _super.call(this, nodeType) || this; _this.flags |= ASTFlags.IsStatement; + return _this; } Statement.prototype.isLoop = function () { return false; }; Statement.prototype.isStatementOrExpression = function () { return true; }; @@ -3632,6 +3659,7 @@ var TypeScript; _this = _super.call(this, NodeType.LabeledStatement) || this; _this.labels = labels; _this.stmt = stmt; + return _this; } LabeledStatement.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); @@ -3667,6 +3695,7 @@ var TypeScript; _this = _super.call(this, NodeType.Block) || this; _this.statements = statements; _this.isStatementBlock = isStatementBlock; + return _this; } Block.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); @@ -3723,6 +3752,7 @@ var TypeScript; _this = _super.call(this, nodeType) || this; _this.target = null; _this.resolvedTarget = null; + return _this; } Jump.prototype.hasExplicitTarget = function () { return (this.target); }; Jump.prototype.setResolvedTarget = function (parser, stmt) { @@ -3775,6 +3805,7 @@ var TypeScript; _this = _super.call(this, NodeType.While) || this; _this.cond = cond; _this.body = null; + return _this; } WhileStatement.prototype.isLoop = function () { return true; }; WhileStatement.prototype.emit = function (emitter, tokenId, startLine) { @@ -3829,6 +3860,7 @@ var TypeScript; _this.body = null; _this.whileAST = null; _this.cond = null; + return _this; } DoWhileStatement.prototype.isLoop = function () { return true; }; DoWhileStatement.prototype.emit = function (emitter, tokenId, startLine) { @@ -3886,6 +3918,7 @@ var TypeScript; _this.cond = cond; _this.elseBod = null; _this.statement = new ASTSpan(); + return _this; } IfStatement.prototype.isCompoundStatement = function () { return true; }; IfStatement.prototype.emit = function (emitter, tokenId, startLine) { @@ -3963,6 +3996,7 @@ var TypeScript; var _this; _this = _super.call(this, NodeType.Return) || this; _this.returnExpression = null; + return _this; } ReturnStatement.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); @@ -3994,6 +4028,7 @@ var TypeScript; function EndCode() { var _this; _this = _super.call(this, NodeType.EndCode) || this; + return _this; } return EndCode; }(AST)); @@ -4009,6 +4044,7 @@ var TypeScript; if (_this.lval && (_this.lval.nodeType == NodeType.VarDecl)) { _this.lval.varFlags |= VarFlags.AutoInit; } + return _this; } ForInStatement.prototype.isLoop = function () { return true; }; ForInStatement.prototype.isFiltered = function () { @@ -4120,6 +4156,7 @@ var TypeScript; var _this; _this = _super.call(this, NodeType.For) || this; _this.init = init; + return _this; } ForStatement.prototype.isLoop = function () { return true; }; ForStatement.prototype.emit = function (emitter, tokenId, startLine) { @@ -4213,6 +4250,7 @@ var TypeScript; _this = _super.call(this, NodeType.With) || this; _this.expr = expr; _this.withSym = null; + return _this; } WithStatement.prototype.isCompoundStatement = function () { return true; }; WithStatement.prototype.emit = function (emitter, tokenId, startLine) { @@ -4241,6 +4279,7 @@ var TypeScript; _this.val = val; _this.defaultCase = null; _this.statement = new ASTSpan(); + return _this; } SwitchStatement.prototype.isCompoundStatement = function () { return true; }; SwitchStatement.prototype.emit = function (emitter, tokenId, startLine) { @@ -4312,6 +4351,7 @@ var TypeScript; var _this; _this = _super.call(this, NodeType.Case) || this; _this.expr = null; + return _this; } CaseStatement.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); @@ -4367,6 +4407,7 @@ var TypeScript; _this = _super.call(this, NodeType.TypeRef) || this; _this.term = term; _this.arrayCount = arrayCount; + return _this; } TypeReference.prototype.emit = function (emitter, tokenId, startLine) { throw new Error("should not emit a type ref"); @@ -4398,6 +4439,7 @@ var TypeScript; _this = _super.call(this, NodeType.TryFinally) || this; _this.tryNode = tryNode; _this.finallyNode = finallyNode; + return _this; } TryFinally.prototype.isCompoundStatement = function () { return true; }; TryFinally.prototype.emit = function (emitter, tokenId, startLine) { @@ -4444,6 +4486,7 @@ var TypeScript; _this = _super.call(this, NodeType.TryCatch) || this; _this.tryNode = tryNode; _this.catchNode = catchNode; + return _this; } TryCatch.prototype.isCompoundStatement = function () { return true; }; TryCatch.prototype.emit = function (emitter, tokenId, startLine) { @@ -4494,6 +4537,7 @@ var TypeScript; var _this; _this = _super.call(this, NodeType.Try) || this; _this.body = body; + return _this; } Try.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); @@ -4529,6 +4573,7 @@ var TypeScript; if (_this.param) { _this.param.varFlags |= VarFlags.AutoInit; } + return _this; } Catch.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); @@ -4597,6 +4642,7 @@ var TypeScript; var _this; _this = _super.call(this, NodeType.Finally) || this; _this.body = body; + return _this; } Finally.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); @@ -4629,6 +4675,7 @@ var TypeScript; _this.isBlockComment = isBlockComment; _this.endsLine = endsLine; _this.text = null; + return _this; } Comment.prototype.getText = function () { if (this.text == null) { @@ -4652,6 +4699,7 @@ var TypeScript; function DebuggerStatement() { var _this; _this = _super.call(this, NodeType.Debugger) || this; + return _this; } DebuggerStatement.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); diff --git a/tests/baselines/reference/parserharness.js b/tests/baselines/reference/parserharness.js index f0db6078832..2d219c63e6a 100644 --- a/tests/baselines/reference/parserharness.js +++ b/tests/baselines/reference/parserharness.js @@ -2384,6 +2384,7 @@ var Harness; _this = _super.call(this, description, block) || this; _this.description = description; _this.block = block; + return _this; } TestCase.prototype.addChild = function (child) { throw new Error("Testcases may not be nested inside other testcases"); @@ -2419,6 +2420,7 @@ var Harness; _this = _super.call(this, description, block) || this; _this.description = description; _this.block = block; + return _this; } /** Run the block, and if the block doesn't raise an error, run the children. */ Scenario.prototype.run = function (done) { @@ -2473,6 +2475,7 @@ var Harness; function Run() { var _this; _this = _super.call(this, 'Test Run', null) || this; + return _this; } Run.prototype.run = function () { emitLog('start'); diff --git a/tests/baselines/reference/privateInstanceMemberAccessibility.js b/tests/baselines/reference/privateInstanceMemberAccessibility.js index 618c38b89d5..c07238dff5e 100644 --- a/tests/baselines/reference/privateInstanceMemberAccessibility.js +++ b/tests/baselines/reference/privateInstanceMemberAccessibility.js @@ -31,6 +31,7 @@ var Derived = (function (_super) { _this = _super.apply(this, arguments) || this; _this.x = _super.prototype.foo; // error _this.z = _super.prototype.foo; // error + return _this; } Derived.prototype.y = function () { return _super.prototype.foo; // error diff --git a/tests/baselines/reference/privateStaticMemberAccessibility.js b/tests/baselines/reference/privateStaticMemberAccessibility.js index e953198290b..0d4cfefb63b 100644 --- a/tests/baselines/reference/privateStaticMemberAccessibility.js +++ b/tests/baselines/reference/privateStaticMemberAccessibility.js @@ -25,6 +25,7 @@ var Derived = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this.bing = function () { return Base.foo; }; // error + return _this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/readonlyConstructorAssignment.js b/tests/baselines/reference/readonlyConstructorAssignment.js index f1b69ecc00b..581b110298a 100644 --- a/tests/baselines/reference/readonlyConstructorAssignment.js +++ b/tests/baselines/reference/readonlyConstructorAssignment.js @@ -60,6 +60,7 @@ var B = (function (_super) { _this = _super.call(this, x) || this; // Fails, x is readonly _this.x = 1; + return _this; } return B; }(A)); @@ -72,6 +73,7 @@ var C = (function (_super) { _this = _super.call(this, x) || this; _this.x = x; _this.x = 1; + return _this; } return C; }(A)); @@ -90,6 +92,7 @@ var E = (function (_super) { _this = _super.call(this, x) || this; _this.x = x; _this.x = 1; + return _this; } return E; }(D)); diff --git a/tests/baselines/reference/returnInConstructor1.js b/tests/baselines/reference/returnInConstructor1.js index cd3a9f4c346..0ee301758cf 100644 --- a/tests/baselines/reference/returnInConstructor1.js +++ b/tests/baselines/reference/returnInConstructor1.js @@ -126,6 +126,7 @@ var H = (function (_super) { var _this; _this = _super.call(this) || this; return new G(); //error + return _this; } return H; }(F)); @@ -135,6 +136,7 @@ var I = (function (_super) { var _this; _this = _super.call(this) || this; return new G(); + return _this; } return I; }(G)); diff --git a/tests/baselines/reference/scopeTests.js b/tests/baselines/reference/scopeTests.js index 3fd9018e945..9436043094e 100644 --- a/tests/baselines/reference/scopeTests.js +++ b/tests/baselines/reference/scopeTests.js @@ -30,6 +30,7 @@ var D = (function (_super) { _this.v = 1; _this.p = 1; C.s = 1; + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js index 29da6d52a38..7fef0a42010 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js @@ -25,6 +25,7 @@ var Greeter = (function (_super) { _this = _super.apply(this, arguments) || this; _this.a = 10; _this.nameA = "Ten"; + return _this; } return Greeter; }(AbstractGreeter)); diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map index 3a75f3d3b66..14f7f65f050 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map] -{"version":3,"file":"sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js","sourceRoot":"","sources":["sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts"],"names":[],"mappings":";;;;;AAAA;IAAA;IACA,CAAC;IAAD,sBAAC;AAAD,CAAC,AADD,IACC;AAED;IAAsB,2BAAe;IAArC;QAAA,UAGC;;QAFU,OAAC,GAAG,EAAE,CAAC;QACP,WAAK,GAAG,KAAK,CAAC;IACzB,CAAC;IAAD,cAAC;AAAD,CAAC,AAHD,CAAsB,eAAe,GAGpC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js","sourceRoot":"","sources":["sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts"],"names":[],"mappings":";;;;;AAAA;IAAA;IACA,CAAC;IAAD,sBAAC;AAAD,CAAC,AADD,IACC;AAED;IAAsB,2BAAe;IAArC;QAAA,UAGC;;QAFU,OAAC,GAAG,EAAE,CAAC;QACP,WAAK,GAAG,KAAK,CAAC;;IACzB,CAAC;IAAD,cAAC;AAAD,CAAC,AAHD,CAAsB,eAAe,GAGpC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt index 7c05c1b4d84..e1adf2f7a29 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt @@ -130,6 +130,7 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 4 >Emitted(17, 28) Source(6, 25) + SourceIndex(0) 5 >Emitted(17, 29) Source(6, 26) + SourceIndex(0) --- +>>> return _this; >>> } 1 >^^^^ 2 > ^ @@ -137,8 +138,8 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 1 > > 2 > } -1 >Emitted(18, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(18, 6) Source(7, 2) + SourceIndex(0) +1 >Emitted(19, 5) Source(7, 1) + SourceIndex(0) +2 >Emitted(19, 6) Source(7, 2) + SourceIndex(0) --- >>> return Greeter; 1->^^^^ @@ -146,8 +147,8 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 3 > ^^^-> 1-> 2 > } -1->Emitted(19, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(19, 19) Source(7, 2) + SourceIndex(0) +1->Emitted(20, 5) Source(7, 1) + SourceIndex(0) +2 >Emitted(20, 19) Source(7, 2) + SourceIndex(0) --- >>>}(AbstractGreeter)); 1-> @@ -166,11 +167,11 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts > public a = 10; > public nameA = "Ten"; > } -1->Emitted(20, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(20, 2) Source(7, 2) + SourceIndex(0) -3 >Emitted(20, 2) Source(4, 1) + SourceIndex(0) -4 >Emitted(20, 3) Source(4, 23) + SourceIndex(0) -5 >Emitted(20, 18) Source(4, 38) + SourceIndex(0) -6 >Emitted(20, 21) Source(7, 2) + SourceIndex(0) +1->Emitted(21, 1) Source(7, 1) + SourceIndex(0) +2 >Emitted(21, 2) Source(7, 2) + SourceIndex(0) +3 >Emitted(21, 2) Source(4, 1) + SourceIndex(0) +4 >Emitted(21, 3) Source(4, 23) + SourceIndex(0) +5 >Emitted(21, 18) Source(4, 38) + SourceIndex(0) +6 >Emitted(21, 21) Source(7, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map \ No newline at end of file diff --git a/tests/baselines/reference/staticInheritance.js b/tests/baselines/reference/staticInheritance.js index 462f2382f3c..5e769cab563 100644 --- a/tests/baselines/reference/staticInheritance.js +++ b/tests/baselines/reference/staticInheritance.js @@ -31,6 +31,7 @@ var B = (function (_super) { _this = _super.apply(this, arguments) || this; _this.p1 = doThing(A); // OK _this.p2 = doThing(B); // OK + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/staticPropSuper.js b/tests/baselines/reference/staticPropSuper.js index f5bac0135af..6240f8c454f 100644 --- a/tests/baselines/reference/staticPropSuper.js +++ b/tests/baselines/reference/staticPropSuper.js @@ -52,6 +52,7 @@ var B = (function (_super) { var _this; var x = 1; // should not error _this = _super.call(this) || this; + return _this; } return B; }(A)); @@ -62,6 +63,7 @@ var C = (function (_super) { var _this; _this.p = 10; var x = 1; // should error + return _this; } return C; }(A)); @@ -71,6 +73,7 @@ var D = (function (_super) { var _this; _this.p = 11; var x = 1; // should error + return _this; } return D; }(A)); @@ -80,6 +83,7 @@ var E = (function (_super) { var _this; _this.p = 12; var x = 1; // should error + return _this; } return E; }(A)); diff --git a/tests/baselines/reference/strictModeInConstructor.js b/tests/baselines/reference/strictModeInConstructor.js index 1af13b1ce7a..4e1c483f1c1 100644 --- a/tests/baselines/reference/strictModeInConstructor.js +++ b/tests/baselines/reference/strictModeInConstructor.js @@ -78,6 +78,7 @@ var B = (function (_super) { "use strict"; // No error _this = _super.call(this) || this; _this.s = 9; + return _this; } return B; }(A)); @@ -88,6 +89,7 @@ var C = (function (_super) { _this = _super.call(this) || this; // No error _this.s = 9; "use strict"; + return _this; } return C; }(A)); @@ -99,6 +101,7 @@ var D = (function (_super) { var x = 1; // Error _this = _super.call(this) || this; "use strict"; + return _this; } return D; }(A)); @@ -108,6 +111,7 @@ var Bs = (function (_super) { var _this; "use strict"; // No error _this = _super.call(this) || this; + return _this; } return Bs; }(A)); @@ -118,6 +122,7 @@ var Cs = (function (_super) { var _this; _this = _super.call(this) || this; // No error "use strict"; + return _this; } return Cs; }(A)); @@ -129,6 +134,7 @@ var Ds = (function (_super) { var x = 1; // no Error _this = _super.call(this) || this; "use strict"; + return _this; } return Ds; }(A)); diff --git a/tests/baselines/reference/superAccess2.js b/tests/baselines/reference/superAccess2.js index 807347e1d16..408f9051bad 100644 --- a/tests/baselines/reference/superAccess2.js +++ b/tests/baselines/reference/superAccess2.js @@ -48,6 +48,7 @@ var Q = (function (_super) { _this = _super.call(this) || this; _this.z = z; _this.xx = _super.prototype.; + return _this; } Q.prototype.foo = function (zz) { if (zz === void 0) { zz = _super.prototype.; } diff --git a/tests/baselines/reference/superCallArgsMustMatch.js b/tests/baselines/reference/superCallArgsMustMatch.js index 770cb0bf79f..dc450147f88 100644 --- a/tests/baselines/reference/superCallArgsMustMatch.js +++ b/tests/baselines/reference/superCallArgsMustMatch.js @@ -45,6 +45,7 @@ var T6 = (function (_super) { // which is instantiated with 'number' in the extends clause _this = _super.call(this, "hi") || this; var x = _this.foo; + return _this; } return T6; }(T5)); diff --git a/tests/baselines/reference/superCallAssignResult.js b/tests/baselines/reference/superCallAssignResult.js index 4eeabdfa282..6e30cc64052 100644 --- a/tests/baselines/reference/superCallAssignResult.js +++ b/tests/baselines/reference/superCallAssignResult.js @@ -27,6 +27,7 @@ var H = (function (_super) { var _this; var x = _this = _super.call(this, 5) || this; // Should be of type void, not E. x = 5; + return _this; } return H; }(E)); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing1.js b/tests/baselines/reference/superCallBeforeThisAccessing1.js index 6af4482f371..a5d6ec18ce3 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing1.js @@ -36,6 +36,7 @@ var D = (function (_super) { t: _this._t }; var i = Factory.create(s); + return _this; } return D; }(Base)); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing2.js b/tests/baselines/reference/superCallBeforeThisAccessing2.js index 8ab6c5f349c..c7a206dbbbe 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing2.js @@ -26,6 +26,7 @@ var D = (function (_super) { function D() { var _this; _this = _super.call(this, function () { _this._t; }) || this; // no error. only check when this is directly accessing in constructor + return _this; } return D; }(Base)); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing3.js b/tests/baselines/reference/superCallBeforeThisAccessing3.js index f77cb964179..185767fefb6 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing3.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing3.js @@ -32,6 +32,7 @@ var D = (function (_super) { x(); // no error; we only check super is called before this when the container is a constructor _this._t; // error _this = _super.call(this, undefined) || this; + return _this; } return D; }(Base)); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing4.js b/tests/baselines/reference/superCallBeforeThisAccessing4.js index c147b0d84cc..311b7ca2183 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing4.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing4.js @@ -27,6 +27,7 @@ var D = (function (_super) { var _this; _this._t; _this = _super.call(this) || this; + return _this; } return D; }(null)); @@ -36,6 +37,7 @@ var E = (function (_super) { var _this; _this = _super.call(this) || this; _this._t; + return _this; } return E; }(null)); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing5.js b/tests/baselines/reference/superCallBeforeThisAccessing5.js index 8fff8068ec0..57228538faf 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing5.js @@ -18,6 +18,7 @@ var D = (function (_super) { function D() { var _this; _this._t; // No error + return _this; } return D; }(null)); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing6.js b/tests/baselines/reference/superCallBeforeThisAccessing6.js index 843a1d3b2cf..e630d539f14 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing6.js @@ -26,6 +26,7 @@ var D = (function (_super) { function D() { var _this; _this = _super.call(this, _this) || this; + return _this; } return D; }(Base)); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing7.js b/tests/baselines/reference/superCallBeforeThisAccessing7.js index d6ad948a08c..9cfe8736774 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing7.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing7.js @@ -32,6 +32,7 @@ var D = (function (_super) { j: _this._t }; _this = _super.call(this, undefined) || this; + return _this; } return D; }(Base)); diff --git a/tests/baselines/reference/superCallBeforeThisAccessing8.js b/tests/baselines/reference/superCallBeforeThisAccessing8.js index cbf0236c4cc..fe459b5e031 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing8.js @@ -32,6 +32,7 @@ var D = (function (_super) { k: _this = _super.call(this, undefined) || this, j: _this._t }; + return _this; } return D; }(Base)); diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js index 6de41cb5188..2cfc0bfcbd4 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js @@ -22,6 +22,7 @@ var D = (function (_super) { function D() { var _this; _this = _super.call(this) || this; + return _this; } return D; }(B)); diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js index 5ae8f8b3874..f9eeadc98e6 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js @@ -21,6 +21,7 @@ var D = (function (_super) { function D() { var _this; _this = _super.call(this) || this; + return _this; } return D; }(B)); diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js index bc85d74c4c8..02bec67d7aa 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js @@ -27,6 +27,7 @@ var B = (function (_super) { function B() { var _this; _this = _super.call(this, function (value) { return String(value); }) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js index a1736bb45f0..55c6ee6f445 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js @@ -27,6 +27,7 @@ var B = (function (_super) { function B() { var _this; _this = _super.call(this, function (value) { return String(value); }) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js index c5beb5df5b5..977377e41d4 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js @@ -27,6 +27,7 @@ var B = (function (_super) { function B() { var _this; _this = _super.call(this, function (value) { return String(value); }) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/superCallInNonStaticMethod.js b/tests/baselines/reference/superCallInNonStaticMethod.js index 1dd120eeb5c..503aee2dcc6 100644 --- a/tests/baselines/reference/superCallInNonStaticMethod.js +++ b/tests/baselines/reference/superCallInNonStaticMethod.js @@ -71,6 +71,7 @@ var Other = (function (_super) { _this.propertyInitializer = _super.prototype.instanceMethod.call(_this); _this.functionProperty = function () { _super.prototype.instanceMethod.call(_this); }; _super.prototype.instanceMethod.call(_this); + return _this; } // in instance method Other.prototype.instanceMethod = function () { diff --git a/tests/baselines/reference/superCallInsideClassDeclaration.js b/tests/baselines/reference/superCallInsideClassDeclaration.js index f47b50d4915..326662abdac 100644 --- a/tests/baselines/reference/superCallInsideClassDeclaration.js +++ b/tests/baselines/reference/superCallInsideClassDeclaration.js @@ -41,9 +41,11 @@ var B = (function (_super) { function D() { var _this; _this = _super.call(this) || this; + return _this; } return D; }(C)); + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/superCallInsideClassExpression.js b/tests/baselines/reference/superCallInsideClassExpression.js index b9e1f6c9786..5797085726d 100644 --- a/tests/baselines/reference/superCallInsideClassExpression.js +++ b/tests/baselines/reference/superCallInsideClassExpression.js @@ -41,9 +41,11 @@ var B = (function (_super) { function class_1() { var _this; _this = _super.call(this) || this; + return _this; } return class_1; }(C)); + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/superCallInsideObjectLiteralExpression.js b/tests/baselines/reference/superCallInsideObjectLiteralExpression.js index 68a9c19e819..636b03c227f 100644 --- a/tests/baselines/reference/superCallInsideObjectLiteralExpression.js +++ b/tests/baselines/reference/superCallInsideObjectLiteralExpression.js @@ -32,6 +32,7 @@ var B = (function (_super) { var x = { x: _this = _super.call(this) || this }; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/superCallOutsideConstructor.js b/tests/baselines/reference/superCallOutsideConstructor.js index 774dde72340..65a8b435166 100644 --- a/tests/baselines/reference/superCallOutsideConstructor.js +++ b/tests/baselines/reference/superCallOutsideConstructor.js @@ -46,6 +46,7 @@ var D = (function (_super) { var y2 = function () { _this = _super.call(this) || this; }; + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/superCallParameterContextualTyping1.js b/tests/baselines/reference/superCallParameterContextualTyping1.js index a311ce95fc7..4e4ae47967a 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping1.js +++ b/tests/baselines/reference/superCallParameterContextualTyping1.js @@ -30,6 +30,7 @@ var B = (function (_super) { function B() { var _this; _this = _super.call(this, function (value) { return String(value.toExponential()); }) || this; + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/superCallParameterContextualTyping2.js b/tests/baselines/reference/superCallParameterContextualTyping2.js index 9439871f38c..f3a246c6389 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping2.js +++ b/tests/baselines/reference/superCallParameterContextualTyping2.js @@ -29,6 +29,7 @@ var C = (function (_super) { function C() { var _this; _this = _super.call(this, function (value) { return String(value()); }) || this; + return _this; } return C; }(A)); diff --git a/tests/baselines/reference/superCallParameterContextualTyping3.js b/tests/baselines/reference/superCallParameterContextualTyping3.js index d77df52ddd6..e7b8b355108 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping3.js +++ b/tests/baselines/reference/superCallParameterContextualTyping3.js @@ -62,6 +62,7 @@ var C = (function (_super) { p.length; } }); + return _this; } return C; }(CBase)); diff --git a/tests/baselines/reference/superCalls.js b/tests/baselines/reference/superCalls.js index 33127da6437..2fe7712ce68 100644 --- a/tests/baselines/reference/superCalls.js +++ b/tests/baselines/reference/superCalls.js @@ -53,6 +53,7 @@ var Derived = (function (_super) { //type of super call expression is void var p = _this = _super.call(this, '') || this; var p = v(); + return _this; } return Derived; }(Base)); @@ -67,6 +68,7 @@ var OtherDerived = (function (_super) { var _this; var p = ''; _this = _super.call(this) || this; + return _this; } return OtherDerived; }(OtherBase)); diff --git a/tests/baselines/reference/superCallsInConstructor.js b/tests/baselines/reference/superCallsInConstructor.js index be34657a0c1..48b79acadf4 100644 --- a/tests/baselines/reference/superCallsInConstructor.js +++ b/tests/baselines/reference/superCallsInConstructor.js @@ -51,6 +51,7 @@ var Derived = (function (_super) { catch (e) { _this = _super.call(this) || this; } + return _this; } return Derived; }(Base)); diff --git a/tests/baselines/reference/superErrors.js b/tests/baselines/reference/superErrors.js index 2e68370fc32..93676c5d8f3 100644 --- a/tests/baselines/reference/superErrors.js +++ b/tests/baselines/reference/superErrors.js @@ -93,6 +93,7 @@ var RegisteredUser = (function (_super) { var _this = this; return function () { return _super.; }; })(); + return _this; } RegisteredUser.prototype.sayHello = function () { // super call in a method diff --git a/tests/baselines/reference/superInConstructorParam1.js b/tests/baselines/reference/superInConstructorParam1.js index 56e40b65e10..7519a8253ec 100644 --- a/tests/baselines/reference/superInConstructorParam1.js +++ b/tests/baselines/reference/superInConstructorParam1.js @@ -29,6 +29,7 @@ var C = (function (_super) { function C(a) { var _this; if (a === void 0) { a = _super.foo.call(_this); } + return _this; } return C; }(B)); diff --git a/tests/baselines/reference/superInLambdas.js b/tests/baselines/reference/superInLambdas.js index 5a1f48f3826..9b4d956dc5a 100644 --- a/tests/baselines/reference/superInLambdas.js +++ b/tests/baselines/reference/superInLambdas.js @@ -92,6 +92,7 @@ var RegisteredUser = (function (_super) { _super.prototype.sayHello.call(_this); // super call in a lambda in a constructor var x = function () { return _super.prototype.sayHello.call(_this); }; + return _this; } RegisteredUser.prototype.sayHello = function () { var _this = this; @@ -110,6 +111,7 @@ var RegisteredUser2 = (function (_super) { _this.name = "Joe"; // super call in a nested lambda in a constructor var x = function () { return function () { return function () { return _super.prototype.sayHello.call(_this); }; }; }; + return _this; } RegisteredUser2.prototype.sayHello = function () { var _this = this; @@ -126,6 +128,7 @@ var RegisteredUser3 = (function (_super) { _this.name = "Sam"; // super property in a nested lambda in a constructor var superName = function () { return function () { return function () { return _super.prototype.name; }; }; }; + return _this; } RegisteredUser3.prototype.sayHello = function () { var _this = this; @@ -142,6 +145,7 @@ var RegisteredUser4 = (function (_super) { _this.name = "Mark"; // super in a nested lambda in a constructor var x = function () { return function () { return _super.prototype.; }; }; + return _this; } RegisteredUser4.prototype.sayHello = function () { var _this = this; diff --git a/tests/baselines/reference/superNewCall1.js b/tests/baselines/reference/superNewCall1.js index 32c4da4d4e4..30b07308bb2 100644 --- a/tests/baselines/reference/superNewCall1.js +++ b/tests/baselines/reference/superNewCall1.js @@ -29,6 +29,7 @@ var B = (function (_super) { function B() { var _this; new _super.prototype(function (value) { return String(value); }); + return _this; } return B; }(A)); diff --git a/tests/baselines/reference/superPropertyAccess1.js b/tests/baselines/reference/superPropertyAccess1.js index c9865806570..b6559a63a98 100644 --- a/tests/baselines/reference/superPropertyAccess1.js +++ b/tests/baselines/reference/superPropertyAccess1.js @@ -54,6 +54,7 @@ var D = (function (_super) { _this = _super.call(this) || this; _super.prototype.bar.call(_this); _super.prototype.x; // error + return _this; } D.prototype.foo = function () { _super.prototype.bar.call(this); diff --git a/tests/baselines/reference/superPropertyAccess2.js b/tests/baselines/reference/superPropertyAccess2.js index df6e08177cb..eded4e74a7f 100644 --- a/tests/baselines/reference/superPropertyAccess2.js +++ b/tests/baselines/reference/superPropertyAccess2.js @@ -54,6 +54,7 @@ var D = (function (_super) { _this = _super.call(this) || this; _super.prototype.bar.call(_this); // error _super.prototype.x; // error + return _this; } D.foo = function () { _super.bar.call(this); // OK diff --git a/tests/baselines/reference/superPropertyAccessNoError.js b/tests/baselines/reference/superPropertyAccessNoError.js index d8dda26288c..2ba460d18f7 100644 --- a/tests/baselines/reference/superPropertyAccessNoError.js +++ b/tests/baselines/reference/superPropertyAccessNoError.js @@ -103,6 +103,7 @@ var SomeDerivedClass = (function (_super) { _this = _super.call(this) || this; var x = _super.prototype.func.call(_this); var x; + return _this; } SomeDerivedClass.prototype.fn = function () { var _this = this; diff --git a/tests/baselines/reference/superPropertyAccess_ES5.js b/tests/baselines/reference/superPropertyAccess_ES5.js index 1d2ab4c2a3f..011c5129e9f 100644 --- a/tests/baselines/reference/superPropertyAccess_ES5.js +++ b/tests/baselines/reference/superPropertyAccess_ES5.js @@ -53,6 +53,7 @@ var MyDerived = (function (_super) { _this = _super.call(this) || this; var f1 = _super.prototype.getValue.call(_this); var f2 = _super.prototype.value; + return _this; } return MyDerived; }(MyBase)); diff --git a/tests/baselines/reference/superWithGenericSpecialization.js b/tests/baselines/reference/superWithGenericSpecialization.js index 499c0a6de1f..1152399e6eb 100644 --- a/tests/baselines/reference/superWithGenericSpecialization.js +++ b/tests/baselines/reference/superWithGenericSpecialization.js @@ -30,6 +30,7 @@ var D = (function (_super) { function D() { var _this; _this = _super.call(this) || this; // uses the type parameter type of the base class, ie string + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/superWithGenerics.js b/tests/baselines/reference/superWithGenerics.js index 471c7cd36ac..f2580d30c5f 100644 --- a/tests/baselines/reference/superWithGenerics.js +++ b/tests/baselines/reference/superWithGenerics.js @@ -22,6 +22,7 @@ var D = (function (_super) { function D() { var _this; _this = _super.call(this) || this; + return _this; } return D; }(B)); diff --git a/tests/baselines/reference/superWithTypeArgument.js b/tests/baselines/reference/superWithTypeArgument.js index cc46fa96896..a1c04975404 100644 --- a/tests/baselines/reference/superWithTypeArgument.js +++ b/tests/baselines/reference/superWithTypeArgument.js @@ -25,6 +25,7 @@ var D = (function (_super) { function D() { var _this; _super.prototype..call(_this); + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/superWithTypeArgument2.js b/tests/baselines/reference/superWithTypeArgument2.js index 4b5176bed96..42a0e46d4c0 100644 --- a/tests/baselines/reference/superWithTypeArgument2.js +++ b/tests/baselines/reference/superWithTypeArgument2.js @@ -25,6 +25,7 @@ var D = (function (_super) { function D(x) { var _this; _super.prototype..call(_this, x); + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/superWithTypeArgument3.js b/tests/baselines/reference/superWithTypeArgument3.js index aa70803de4d..803e5c264c2 100644 --- a/tests/baselines/reference/superWithTypeArgument3.js +++ b/tests/baselines/reference/superWithTypeArgument3.js @@ -30,6 +30,7 @@ var D = (function (_super) { function D() { var _this; _super.prototype..call(_this); + return _this; } D.prototype.bar = function () { _super.prototype.bar.call(this, null); diff --git a/tests/baselines/reference/targetTypeBaseCalls.js b/tests/baselines/reference/targetTypeBaseCalls.js index a9bbc34123f..a08380b173f 100644 --- a/tests/baselines/reference/targetTypeBaseCalls.js +++ b/tests/baselines/reference/targetTypeBaseCalls.js @@ -37,6 +37,7 @@ var Bar = (function (_super) { function Bar() { var _this; _this = _super.call(this, function (s) { s = 5; }) || this; + return _this; } return Bar; }(Foo)); // error, if types are applied correctly diff --git a/tests/baselines/reference/thisInInvalidContexts.js b/tests/baselines/reference/thisInInvalidContexts.js index 218ebfb1686..10629d579ba 100644 --- a/tests/baselines/reference/thisInInvalidContexts.js +++ b/tests/baselines/reference/thisInInvalidContexts.js @@ -72,6 +72,7 @@ var ClassWithNoInitializer = (function (_super) { function ClassWithNoInitializer() { var _this; _this = _super.call(this, _this) || this; // Error + return _this; } return ClassWithNoInitializer; }(BaseErrClass)); @@ -82,6 +83,7 @@ var ClassWithInitializer = (function (_super) { var _this; _this = _super.call(this, _this) || this; // Error _this.t = 4; + return _this; } return ClassWithInitializer; }(BaseErrClass)); diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.js b/tests/baselines/reference/thisInInvalidContextsExternalModule.js index c14f71ac0b6..444952fea3f 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.js +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.js @@ -73,6 +73,7 @@ var ClassWithNoInitializer = (function (_super) { function ClassWithNoInitializer() { var _this; _this = _super.call(this, _this) || this; // error: "super" has to be called before "this" accessing + return _this; } return ClassWithNoInitializer; }(BaseErrClass)); @@ -83,6 +84,7 @@ var ClassWithInitializer = (function (_super) { var _this; _this = _super.call(this, _this) || this; // Error _this.t = 4; + return _this; } return ClassWithInitializer; }(BaseErrClass)); diff --git a/tests/baselines/reference/thisInSuperCall.js b/tests/baselines/reference/thisInSuperCall.js index cf64eebced1..f9d9f8694c9 100644 --- a/tests/baselines/reference/thisInSuperCall.js +++ b/tests/baselines/reference/thisInSuperCall.js @@ -38,6 +38,7 @@ var Foo = (function (_super) { function Foo() { var _this; _this = _super.call(this, _this) || this; // error: "super" has to be called before "this" accessing + return _this; } return Foo; }(Base)); @@ -47,6 +48,7 @@ var Foo2 = (function (_super) { var _this; _this = _super.call(this, _this) || this; // error _this.p = 0; + return _this; } return Foo2; }(Base)); @@ -56,6 +58,7 @@ var Foo3 = (function (_super) { var _this; _this = _super.call(this, _this) || this; // error _this.p = p; + return _this; } return Foo3; }(Base)); diff --git a/tests/baselines/reference/thisInSuperCall1.js b/tests/baselines/reference/thisInSuperCall1.js index eba933d9893..3185e42dab6 100644 --- a/tests/baselines/reference/thisInSuperCall1.js +++ b/tests/baselines/reference/thisInSuperCall1.js @@ -27,6 +27,7 @@ var Foo = (function (_super) { var _this; _this = _super.call(this, _this) || this; _this.x = x; + return _this; } return Foo; }(Base)); diff --git a/tests/baselines/reference/thisInSuperCall2.js b/tests/baselines/reference/thisInSuperCall2.js index ed6baabb408..b9f7571868a 100644 --- a/tests/baselines/reference/thisInSuperCall2.js +++ b/tests/baselines/reference/thisInSuperCall2.js @@ -35,6 +35,7 @@ var Foo = (function (_super) { function Foo() { var _this; _this = _super.call(this, _this) || this; // error: "super" has to be called before "this" accessing + return _this; } return Foo; }(Base)); @@ -44,6 +45,7 @@ var Foo2 = (function (_super) { var _this; _this = _super.call(this, _this) || this; // error _this.x = 0; + return _this; } return Foo2; }(Base)); diff --git a/tests/baselines/reference/thisInSuperCall3.js b/tests/baselines/reference/thisInSuperCall3.js index d705d5fa7e0..309ebf93407 100644 --- a/tests/baselines/reference/thisInSuperCall3.js +++ b/tests/baselines/reference/thisInSuperCall3.js @@ -29,6 +29,7 @@ var Foo = (function (_super) { var _this; _this = _super.call(this, _this) || this; _this.x = 0; + return _this; } return Foo; }(Base)); diff --git a/tests/baselines/reference/tsxDynamicTagName5.js b/tests/baselines/reference/tsxDynamicTagName5.js index 76b79dbc7dc..307cd0fca93 100644 --- a/tests/baselines/reference/tsxDynamicTagName5.js +++ b/tests/baselines/reference/tsxDynamicTagName5.js @@ -33,6 +33,7 @@ var Text = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this._tagName = 'div'; + return _this; } Text.prototype.render = function () { return (); diff --git a/tests/baselines/reference/tsxDynamicTagName7.js b/tests/baselines/reference/tsxDynamicTagName7.js index c55ceb100ea..39e30b6ba38 100644 --- a/tests/baselines/reference/tsxDynamicTagName7.js +++ b/tests/baselines/reference/tsxDynamicTagName7.js @@ -33,6 +33,7 @@ var Text = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this._tagName = 'div'; + return _this; } Text.prototype.render = function () { return ( // this should be an error diff --git a/tests/baselines/reference/tsxDynamicTagName8.js b/tests/baselines/reference/tsxDynamicTagName8.js index 57ce2becbad..77423709347 100644 --- a/tests/baselines/reference/tsxDynamicTagName8.js +++ b/tests/baselines/reference/tsxDynamicTagName8.js @@ -33,6 +33,7 @@ var Text = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this._tagName = 'div'; + return _this; } Text.prototype.render = function () { return ( Hello world ); diff --git a/tests/baselines/reference/tsxDynamicTagName9.js b/tests/baselines/reference/tsxDynamicTagName9.js index 1bc14eb32ee..6b5d130c0b4 100644 --- a/tests/baselines/reference/tsxDynamicTagName9.js +++ b/tests/baselines/reference/tsxDynamicTagName9.js @@ -33,6 +33,7 @@ var Text = (function (_super) { var _this; _this = _super.apply(this, arguments) || this; _this._tagName = 'div'; + return _this; } Text.prototype.render = function () { return ( Hello world ); diff --git a/tests/baselines/reference/typeGuardOfFormThisMember.js b/tests/baselines/reference/typeGuardOfFormThisMember.js index fefb1e7ff38..3995ffd447c 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMember.js +++ b/tests/baselines/reference/typeGuardOfFormThisMember.js @@ -121,6 +121,7 @@ var Test; var _this; _this = _super.call(this, path) || this; _this.content = content; + return _this; } return File; }(FileSystemObject)); diff --git a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js index ed53a308808..14807ddd88c 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js +++ b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js @@ -71,6 +71,7 @@ var Test; var _this; _this = _super.call(this, path) || this; _this.content = content; + return _this; } return File; }(FileSystemObject)); diff --git a/tests/baselines/reference/typeOfSuperCall.js b/tests/baselines/reference/typeOfSuperCall.js index 70ace4becb4..179e981b8d1 100644 --- a/tests/baselines/reference/typeOfSuperCall.js +++ b/tests/baselines/reference/typeOfSuperCall.js @@ -24,6 +24,7 @@ var D = (function (_super) { function D() { var _this; var x = _this = _super.call(this) || this; + return _this; } return D; }(C)); diff --git a/tests/baselines/reference/typeRelationships.js b/tests/baselines/reference/typeRelationships.js index 87f0f60c53f..eee99568638 100644 --- a/tests/baselines/reference/typeRelationships.js +++ b/tests/baselines/reference/typeRelationships.js @@ -78,6 +78,7 @@ var D = (function (_super) { _this.self2 = _this.self; _this.self3 = _this.foo(); _this.d = new D(); + return _this; } D.prototype.bar = function () { this.self = this.self1; diff --git a/tests/baselines/reference/unknownSymbols1.js b/tests/baselines/reference/unknownSymbols1.js index 46ee4ed02d5..2c2b3ded1b5 100644 --- a/tests/baselines/reference/unknownSymbols1.js +++ b/tests/baselines/reference/unknownSymbols1.js @@ -65,6 +65,7 @@ var C4 = (function (_super) { function C4() { var _this; _this = _super.call(this, asdf) || this; + return _this; } return C4; }(C3)); diff --git a/tests/baselines/reference/unspecializedConstraints.js b/tests/baselines/reference/unspecializedConstraints.js index 06d2c4bd6a5..02927bf558d 100644 --- a/tests/baselines/reference/unspecializedConstraints.js +++ b/tests/baselines/reference/unspecializedConstraints.js @@ -239,6 +239,7 @@ var ts; _this.name = name; _this.type = type; _this.flags = flags; + return _this; } Property.prototype.equals = function (other) { return this.name === other.name && @@ -260,6 +261,7 @@ var ts; _this.typeParameters = typeParameters; _this.parameters = parameters; _this.returnType = returnType; + return _this; } Signature.prototype.equalsNoReturn = function (other) { return this.parameters.length === other.parameters.length && @@ -281,6 +283,7 @@ var ts; _this.name = name; _this.type = type; _this.flags = flags; + return _this; } Parameter.prototype.equals = function (other) { return this.name === other.name && diff --git a/tests/baselines/reference/validUseOfThisInSuper.js b/tests/baselines/reference/validUseOfThisInSuper.js index 96802932f12..3a05ff12ee8 100644 --- a/tests/baselines/reference/validUseOfThisInSuper.js +++ b/tests/baselines/reference/validUseOfThisInSuper.js @@ -26,6 +26,7 @@ var Super = (function (_super) { function Super() { var _this; _this = _super.call(this, (function () { return _this; })()) || this; // ok since this is not the case: The constructor declares parameter properties or the containing class declares instance member variables with initializers. + return _this; } return Super; }(Base)); diff --git a/tests/baselines/reference/varArgsOnConstructorTypes.js b/tests/baselines/reference/varArgsOnConstructorTypes.js index 04eaa58a196..9c1c8f8c29d 100644 --- a/tests/baselines/reference/varArgsOnConstructorTypes.js +++ b/tests/baselines/reference/varArgsOnConstructorTypes.js @@ -45,6 +45,7 @@ define(["require", "exports"], function (require, exports) { _this = _super.call(this, element) || this; _this.p1 = element; _this.p2 = url; + return _this; } return B; }(A));