diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts
index e559350202b..072be8b1dfc 100644
--- a/src/compiler/transformers/es2015.ts
+++ b/src/compiler/transformers/es2015.ts
@@ -925,7 +925,10 @@ namespace ts {
}
- const superCaptureStatus = declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, constructor, !!extendsClauseElement, hasSynthesizedSuper, statementOffset);
+ // determine whether the class is known syntactically to be a derived class (e.g. a
+ // class that extends a value that is not syntactically known to be `null`).
+ const isDerivedClass = extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== SyntaxKind.NullKeyword;
+ const superCaptureStatus = declareOrCaptureOrReturnThisForConstructorIfNeeded(statements, constructor, isDerivedClass, hasSynthesizedSuper, statementOffset);
// The last statement expression was replaced. Skip it.
if (superCaptureStatus === SuperCaptureResult.ReplaceSuperCapture || superCaptureStatus === SuperCaptureResult.ReplaceWithReturn) {
@@ -942,7 +945,7 @@ namespace ts {
// Return `_this` unless we're sure enough that it would be pointless to add a return statement.
// If there's a constructor that we can tell returns in enough places, then we *do not* want to add a return.
- if (extendsClauseElement
+ if (isDerivedClass
&& superCaptureStatus !== SuperCaptureResult.ReplaceWithReturn
&& !(constructor && isSufficientlyCoveredByReturnStatements(constructor.body))) {
statements.push(
@@ -1011,11 +1014,11 @@ namespace ts {
function declareOrCaptureOrReturnThisForConstructorIfNeeded(
statements: Statement[],
ctor: ConstructorDeclaration | undefined,
- hasExtendsClause: boolean,
+ isDerivedClass: boolean,
hasSynthesizedSuper: boolean,
statementOffset: number) {
// If this isn't a derived class, just capture 'this' for arrow functions if necessary.
- if (!hasExtendsClause) {
+ if (!isDerivedClass) {
if (ctor) {
addCaptureThisForNodeIfNeeded(statements, ctor);
}
@@ -1091,7 +1094,7 @@ namespace ts {
}
// Perform the capture.
- captureThisForNode(statements, ctor, superCallExpression, firstStatement);
+ captureThisForNode(statements, ctor, superCallExpression || createActualThis(), firstStatement);
// If we're actually replacing the original statement, we need to signal this to the caller.
if (superCallExpression) {
@@ -1101,15 +1104,25 @@ namespace ts {
return SuperCaptureResult.NoReplacement;
}
+ function createActualThis() {
+ return setEmitFlags(createThis(), EmitFlags.NoSubstitution);
+ }
+
function createDefaultSuperCallOrThis() {
- const actualThis = createThis();
- setEmitFlags(actualThis, EmitFlags.NoSubstitution);
- const superCall = createFunctionApply(
- createIdentifier("_super"),
- actualThis,
- createIdentifier("arguments"),
+ return createLogicalOr(
+ createLogicalAnd(
+ createStrictInequality(
+ createIdentifier("_super"),
+ createNull()
+ ),
+ createFunctionApply(
+ createIdentifier("_super"),
+ createActualThis(),
+ createIdentifier("arguments"),
+ )
+ ),
+ createActualThis()
);
- return createLogicalOr(superCall, actualThis);
}
/**
diff --git a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js
index abdbe37f2e6..c3084700547 100644
--- a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js
+++ b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js
@@ -43,7 +43,7 @@ var A;
var Point3d = (function (_super) {
__extends(Point3d, _super);
function Point3d() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Point3d;
}(Point));
diff --git a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js
index c674c23ab84..fe4308281d1 100644
--- a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js
+++ b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js
@@ -46,7 +46,7 @@ var A;
var Point3d = (function (_super) {
__extends(Point3d, _super);
function Point3d() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Point3d;
}(Point));
diff --git a/tests/baselines/reference/abstractClassInLocalScope.js b/tests/baselines/reference/abstractClassInLocalScope.js
index 111714fcc13..d841911b0bf 100644
--- a/tests/baselines/reference/abstractClassInLocalScope.js
+++ b/tests/baselines/reference/abstractClassInLocalScope.js
@@ -27,7 +27,7 @@ var __extends = (this && this.__extends) || (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
diff --git a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js
index 16e3e7c497d..a513ce3d88e 100644
--- a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js
+++ b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js
@@ -27,7 +27,7 @@ var __extends = (this && this.__extends) || (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
diff --git a/tests/baselines/reference/abstractProperty.js b/tests/baselines/reference/abstractProperty.js
index 0cb89665b94..f4b2d432f24 100644
--- a/tests/baselines/reference/abstractProperty.js
+++ b/tests/baselines/reference/abstractProperty.js
@@ -40,7 +40,7 @@ var B = (function () {
var C = (function (_super) {
__extends(C, _super);
function C() {
- var _this = _super.apply(this, arguments) || this;
+ var _this = _super !== null && _super.apply(this, arguments) || this;
_this.raw = "edge";
_this.ro = "readonly please";
return _this;
diff --git a/tests/baselines/reference/abstractPropertyNegative.js b/tests/baselines/reference/abstractPropertyNegative.js
index 1b0898de8e3..5ff6708b89a 100644
--- a/tests/baselines/reference/abstractPropertyNegative.js
+++ b/tests/baselines/reference/abstractPropertyNegative.js
@@ -62,7 +62,7 @@ var B = (function () {
var C = (function (_super) {
__extends(C, _super);
function C() {
- var _this = _super.apply(this, arguments) || this;
+ var _this = _super !== null && _super.apply(this, arguments) || this;
_this.ro = "readonly please";
return _this;
}
@@ -83,7 +83,7 @@ var WrongTypeProperty = (function () {
var WrongTypePropertyImpl = (function (_super) {
__extends(WrongTypePropertyImpl, _super);
function WrongTypePropertyImpl() {
- var _this = _super.apply(this, arguments) || this;
+ var _this = _super !== null && _super.apply(this, arguments) || this;
_this.num = "nope, wrong";
return _this;
}
@@ -97,7 +97,7 @@ var WrongTypeAccessor = (function () {
var WrongTypeAccessorImpl = (function (_super) {
__extends(WrongTypeAccessorImpl, _super);
function WrongTypeAccessorImpl() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(WrongTypeAccessorImpl.prototype, "num", {
get: function () { return "nope, wrong"; },
@@ -109,7 +109,7 @@ var WrongTypeAccessorImpl = (function (_super) {
var WrongTypeAccessorImpl2 = (function (_super) {
__extends(WrongTypeAccessorImpl2, _super);
function WrongTypeAccessorImpl2() {
- var _this = _super.apply(this, arguments) || this;
+ var _this = _super !== null && _super.apply(this, arguments) || this;
_this.num = "nope, wrong";
return _this;
}
diff --git a/tests/baselines/reference/accessors_spec_section-4.5_inference.js b/tests/baselines/reference/accessors_spec_section-4.5_inference.js
index 50a498e278c..8d9ef160e2e 100644
--- a/tests/baselines/reference/accessors_spec_section-4.5_inference.js
+++ b/tests/baselines/reference/accessors_spec_section-4.5_inference.js
@@ -43,7 +43,7 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
diff --git a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js
index 87ce93aa104..41a2bb06664 100644
--- a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js
+++ b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js
@@ -51,7 +51,7 @@ var Backbone = require("./aliasUsage1_backbone");
var VisualizationModel = (function (_super) {
__extends(VisualizationModel, _super);
function VisualizationModel() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return VisualizationModel;
}(Backbone.Model));
diff --git a/tests/baselines/reference/aliasUsageInArray.js b/tests/baselines/reference/aliasUsageInArray.js
index fa93daad9bc..1f3e1490332 100644
--- a/tests/baselines/reference/aliasUsageInArray.js
+++ b/tests/baselines/reference/aliasUsageInArray.js
@@ -45,7 +45,7 @@ var Backbone = require("./aliasUsageInArray_backbone");
var VisualizationModel = (function (_super) {
__extends(VisualizationModel, _super);
function VisualizationModel() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return VisualizationModel;
}(Backbone.Model));
diff --git a/tests/baselines/reference/aliasUsageInFunctionExpression.js b/tests/baselines/reference/aliasUsageInFunctionExpression.js
index 908480fb5b2..a6fc0e97f68 100644
--- a/tests/baselines/reference/aliasUsageInFunctionExpression.js
+++ b/tests/baselines/reference/aliasUsageInFunctionExpression.js
@@ -44,7 +44,7 @@ var Backbone = require("./aliasUsageInFunctionExpression_backbone");
var VisualizationModel = (function (_super) {
__extends(VisualizationModel, _super);
function VisualizationModel() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return VisualizationModel;
}(Backbone.Model));
diff --git a/tests/baselines/reference/aliasUsageInGenericFunction.js b/tests/baselines/reference/aliasUsageInGenericFunction.js
index f0625fde40a..a991207971c 100644
--- a/tests/baselines/reference/aliasUsageInGenericFunction.js
+++ b/tests/baselines/reference/aliasUsageInGenericFunction.js
@@ -48,7 +48,7 @@ var Backbone = require("./aliasUsageInGenericFunction_backbone");
var VisualizationModel = (function (_super) {
__extends(VisualizationModel, _super);
function VisualizationModel() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return VisualizationModel;
}(Backbone.Model));
diff --git a/tests/baselines/reference/aliasUsageInIndexerOfClass.js b/tests/baselines/reference/aliasUsageInIndexerOfClass.js
index 11a9a969a49..d57b2f6379d 100644
--- a/tests/baselines/reference/aliasUsageInIndexerOfClass.js
+++ b/tests/baselines/reference/aliasUsageInIndexerOfClass.js
@@ -50,7 +50,7 @@ var Backbone = require("./aliasUsageInIndexerOfClass_backbone");
var VisualizationModel = (function (_super) {
__extends(VisualizationModel, _super);
function VisualizationModel() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return VisualizationModel;
}(Backbone.Model));
diff --git a/tests/baselines/reference/aliasUsageInObjectLiteral.js b/tests/baselines/reference/aliasUsageInObjectLiteral.js
index e82b58bab8f..15818c82cb9 100644
--- a/tests/baselines/reference/aliasUsageInObjectLiteral.js
+++ b/tests/baselines/reference/aliasUsageInObjectLiteral.js
@@ -45,7 +45,7 @@ var Backbone = require("./aliasUsageInObjectLiteral_backbone");
var VisualizationModel = (function (_super) {
__extends(VisualizationModel, _super);
function VisualizationModel() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return VisualizationModel;
}(Backbone.Model));
diff --git a/tests/baselines/reference/aliasUsageInOrExpression.js b/tests/baselines/reference/aliasUsageInOrExpression.js
index 4dc10ee726b..99360ea648d 100644
--- a/tests/baselines/reference/aliasUsageInOrExpression.js
+++ b/tests/baselines/reference/aliasUsageInOrExpression.js
@@ -48,7 +48,7 @@ var Backbone = require("./aliasUsageInOrExpression_backbone");
var VisualizationModel = (function (_super) {
__extends(VisualizationModel, _super);
function VisualizationModel() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return VisualizationModel;
}(Backbone.Model));
diff --git a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js
index e7c42281f4f..47f0c30d28b 100644
--- a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js
+++ b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js
@@ -48,7 +48,7 @@ var Backbone = require("./aliasUsageInTypeArgumentOfExtendsClause_backbone");
var VisualizationModel = (function (_super) {
__extends(VisualizationModel, _super);
function VisualizationModel() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return VisualizationModel;
}(Backbone.Model));
@@ -74,7 +74,7 @@ var C = (function () {
var D = (function (_super) {
__extends(D, _super);
function D() {
- var _this = _super.apply(this, arguments) || this;
+ var _this = _super !== null && _super.apply(this, arguments) || this;
_this.x = moduleA;
return _this;
}
diff --git a/tests/baselines/reference/aliasUsageInVarAssignment.js b/tests/baselines/reference/aliasUsageInVarAssignment.js
index 1d1b1c51f2c..666e32e1546 100644
--- a/tests/baselines/reference/aliasUsageInVarAssignment.js
+++ b/tests/baselines/reference/aliasUsageInVarAssignment.js
@@ -44,7 +44,7 @@ var Backbone = require("./aliasUsageInVarAssignment_backbone");
var VisualizationModel = (function (_super) {
__extends(VisualizationModel, _super);
function VisualizationModel() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return VisualizationModel;
}(Backbone.Model));
diff --git a/tests/baselines/reference/ambiguousOverloadResolution.js b/tests/baselines/reference/ambiguousOverloadResolution.js
index 1f24276e2fb..12d0f01cf4a 100644
--- a/tests/baselines/reference/ambiguousOverloadResolution.js
+++ b/tests/baselines/reference/ambiguousOverloadResolution.js
@@ -27,7 +27,7 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
diff --git a/tests/baselines/reference/apparentTypeSubtyping.js b/tests/baselines/reference/apparentTypeSubtyping.js
index 7bbd61d6689..df266c20951 100644
--- a/tests/baselines/reference/apparentTypeSubtyping.js
+++ b/tests/baselines/reference/apparentTypeSubtyping.js
@@ -43,7 +43,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
@@ -56,7 +56,7 @@ var Base2 = (function () {
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Base2));
diff --git a/tests/baselines/reference/apparentTypeSupertype.js b/tests/baselines/reference/apparentTypeSupertype.js
index 2b835917fb4..16d43e8316c 100644
--- a/tests/baselines/reference/apparentTypeSupertype.js
+++ b/tests/baselines/reference/apparentTypeSupertype.js
@@ -33,7 +33,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
diff --git a/tests/baselines/reference/arrayAssignmentTest1.js b/tests/baselines/reference/arrayAssignmentTest1.js
index c080b83957b..511d37b1752 100644
--- a/tests/baselines/reference/arrayAssignmentTest1.js
+++ b/tests/baselines/reference/arrayAssignmentTest1.js
@@ -106,7 +106,7 @@ var C1 = (function () {
var C2 = (function (_super) {
__extends(C2, _super);
function C2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
C2.prototype.C2M1 = function () { return null; };
return C2;
diff --git a/tests/baselines/reference/arrayAssignmentTest2.js b/tests/baselines/reference/arrayAssignmentTest2.js
index 5e2911b13fb..233ea1b1159 100644
--- a/tests/baselines/reference/arrayAssignmentTest2.js
+++ b/tests/baselines/reference/arrayAssignmentTest2.js
@@ -80,7 +80,7 @@ var C1 = (function () {
var C2 = (function (_super) {
__extends(C2, _super);
function C2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
C2.prototype.C2M1 = function () { return null; };
return C2;
diff --git a/tests/baselines/reference/arrayBestCommonTypes.js b/tests/baselines/reference/arrayBestCommonTypes.js
index bc78f629bcb..3a0ab1a5cf5 100644
--- a/tests/baselines/reference/arrayBestCommonTypes.js
+++ b/tests/baselines/reference/arrayBestCommonTypes.js
@@ -133,7 +133,7 @@ var EmptyTypes;
var derived = (function (_super) {
__extends(derived, _super);
function derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return derived;
}(base));
@@ -192,7 +192,7 @@ var NonEmptyTypes;
var derived = (function (_super) {
__extends(derived, _super);
function derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return derived;
}(base));
diff --git a/tests/baselines/reference/arrayLiteralTypeInference.js b/tests/baselines/reference/arrayLiteralTypeInference.js
index fc62da7d3a2..d9b830e8184 100644
--- a/tests/baselines/reference/arrayLiteralTypeInference.js
+++ b/tests/baselines/reference/arrayLiteralTypeInference.js
@@ -70,14 +70,14 @@ var Action = (function () {
var ActionA = (function (_super) {
__extends(ActionA, _super);
function ActionA() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return ActionA;
}(Action));
var ActionB = (function (_super) {
__extends(ActionB, _super);
function ActionB() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return ActionB;
}(Action));
diff --git a/tests/baselines/reference/arrayLiterals.js b/tests/baselines/reference/arrayLiterals.js
index 8d69ab90dcf..8041ac399f0 100644
--- a/tests/baselines/reference/arrayLiterals.js
+++ b/tests/baselines/reference/arrayLiterals.js
@@ -75,7 +75,7 @@ var Base = (function () {
var Derived1 = (function (_super) {
__extends(Derived1, _super);
function Derived1() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived1;
}(Base));
@@ -83,7 +83,7 @@ var Derived1 = (function (_super) {
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Base));
diff --git a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js
index bd1d38de4cb..8321a572178 100644
--- a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js
+++ b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js
@@ -44,7 +44,7 @@ var List = (function () {
var DerivedList = (function (_super) {
__extends(DerivedList, _super);
function DerivedList() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return DerivedList;
}(List));
diff --git a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js
index 3e4e6d6a148..b2164a07b81 100644
--- a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js
+++ b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js
@@ -38,14 +38,14 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(Array));
diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js
index f0c8557659b..58fd19326ee 100644
--- a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js
+++ b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js
@@ -119,21 +119,21 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Derived));
var OtherDerived = (function (_super) {
__extends(OtherDerived, _super);
function OtherDerived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return OtherDerived;
}(Base));
diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js
index 40c98239cbc..37030895006 100644
--- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js
+++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js
@@ -120,21 +120,21 @@ var Errors;
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Derived));
var OtherDerived = (function (_super) {
__extends(OtherDerived, _super);
function OtherDerived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return OtherDerived;
}(Base));
diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js
index 2ac6493af4d..17ebf51308b 100644
--- a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js
+++ b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js
@@ -85,21 +85,21 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Derived));
var OtherDerived = (function (_super) {
__extends(OtherDerived, _super);
function OtherDerived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return OtherDerived;
}(Base));
diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js
index 1281cfc0f5d..905ef432786 100644
--- a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js
+++ b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js
@@ -62,21 +62,21 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Derived));
var OtherDerived = (function (_super) {
__extends(OtherDerived, _super);
function OtherDerived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return OtherDerived;
}(Base));
diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js
index 888a4939854..25f267c19c8 100644
--- a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js
+++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js
@@ -119,21 +119,21 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Derived));
var OtherDerived = (function (_super) {
__extends(OtherDerived, _super);
function OtherDerived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return OtherDerived;
}(Base));
diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js
index 32081f035e6..879b24a3dde 100644
--- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js
+++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js
@@ -120,21 +120,21 @@ var Errors;
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Derived));
var OtherDerived = (function (_super) {
__extends(OtherDerived, _super);
function OtherDerived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return OtherDerived;
}(Base));
diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js
index 7c4e7ca53f3..b2d722c6791 100644
--- a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js
+++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js
@@ -85,21 +85,21 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Derived));
var OtherDerived = (function (_super) {
__extends(OtherDerived, _super);
function OtherDerived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return OtherDerived;
}(Base));
diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js
index 5ac28d58024..6c68a3edbfe 100644
--- a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js
+++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js
@@ -62,21 +62,21 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Derived));
var OtherDerived = (function (_super) {
__extends(OtherDerived, _super);
function OtherDerived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return OtherDerived;
}(Base));
diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js
index 59d173ebd71..e05538472fe 100644
--- a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js
+++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js
@@ -77,7 +77,7 @@ var Generics;
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js
index afac7265036..6ea115fde33 100644
--- a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js
+++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js
@@ -64,7 +64,7 @@ b = a; // ok
var B2 = (function (_super) {
__extends(B2, _super);
function B2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B2;
}(A));
diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js
index 9204c87a172..bdd502ee027 100644
--- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js
+++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js
@@ -113,14 +113,14 @@ var OnlyDerived;
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Base));
@@ -172,14 +172,14 @@ var WithBase;
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Base));
diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js
index 1e539a9713b..b5274280b31 100644
--- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js
+++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js
@@ -108,14 +108,14 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Derived));
diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js
index 3387a818b6f..e158a787878 100644
--- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js
+++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js
@@ -110,14 +110,14 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Derived));
diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer.js b/tests/baselines/reference/assignmentCompatWithStringIndexer.js
index d296c256d17..8f3b23cfffb 100644
--- a/tests/baselines/reference/assignmentCompatWithStringIndexer.js
+++ b/tests/baselines/reference/assignmentCompatWithStringIndexer.js
@@ -87,7 +87,7 @@ var Generics;
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
@@ -98,7 +98,7 @@ var Generics;
var B2 = (function (_super) {
__extends(B2, _super);
function B2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B2;
}(A));
diff --git a/tests/baselines/reference/asyncImportedPromise_es5.js b/tests/baselines/reference/asyncImportedPromise_es5.js
index 8bf88bd16e4..280e8a87916 100644
--- a/tests/baselines/reference/asyncImportedPromise_es5.js
+++ b/tests/baselines/reference/asyncImportedPromise_es5.js
@@ -24,7 +24,7 @@ var __extends = (this && this.__extends) || (function () {
var Task = (function (_super) {
__extends(Task, _super);
function Task() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Task;
}(Promise));
diff --git a/tests/baselines/reference/asyncMethodWithSuper_es5.js b/tests/baselines/reference/asyncMethodWithSuper_es5.js
index 235f2763f9f..c68b1ed036f 100644
--- a/tests/baselines/reference/asyncMethodWithSuper_es5.js
+++ b/tests/baselines/reference/asyncMethodWithSuper_es5.js
@@ -61,7 +61,7 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
// async method with only call/get on 'super' does not require a binding
B.prototype.simple = function () {
diff --git a/tests/baselines/reference/asyncQualifiedReturnType_es5.js b/tests/baselines/reference/asyncQualifiedReturnType_es5.js
index dd54f6ee833..3cae9ea6b56 100644
--- a/tests/baselines/reference/asyncQualifiedReturnType_es5.js
+++ b/tests/baselines/reference/asyncQualifiedReturnType_es5.js
@@ -13,7 +13,7 @@ var X;
var MyPromise = (function (_super) {
__extends(MyPromise, _super);
function MyPromise() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return MyPromise;
}(Promise));
diff --git a/tests/baselines/reference/awaitClassExpression_es5.js b/tests/baselines/reference/awaitClassExpression_es5.js
index b207ba08f8d..9cb8ce22f63 100644
--- a/tests/baselines/reference/awaitClassExpression_es5.js
+++ b/tests/baselines/reference/awaitClassExpression_es5.js
@@ -17,7 +17,7 @@ function func() {
_a = function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
};
diff --git a/tests/baselines/reference/baseIndexSignatureResolution.js b/tests/baselines/reference/baseIndexSignatureResolution.js
index 82818ecafbe..e57e5272ade 100644
--- a/tests/baselines/reference/baseIndexSignatureResolution.js
+++ b/tests/baselines/reference/baseIndexSignatureResolution.js
@@ -43,7 +43,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
diff --git a/tests/baselines/reference/baseTypeOrderChecking.js b/tests/baselines/reference/baseTypeOrderChecking.js
index 57ee369a03c..06e7dd0c681 100644
--- a/tests/baselines/reference/baseTypeOrderChecking.js
+++ b/tests/baselines/reference/baseTypeOrderChecking.js
@@ -56,7 +56,7 @@ var Class1 = (function () {
var Class2 = (function (_super) {
__extends(Class2, _super);
function Class2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Class2;
}(Class1));
@@ -68,7 +68,7 @@ var Class3 = (function () {
var Class4 = (function (_super) {
__extends(Class4, _super);
function Class4() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Class4;
}(Class3));
diff --git a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js
index d2087b3100a..7442d1e0e6a 100644
--- a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js
+++ b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js
@@ -46,7 +46,7 @@ var CBaseBase = (function () {
var CBase = (function (_super) {
__extends(CBase, _super);
function CBase() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return CBase;
}(CBaseBase));
@@ -64,7 +64,7 @@ var Wrapper = (function () {
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
C.prototype.works = function () {
new CBaseBase(this);
diff --git a/tests/baselines/reference/bases.js b/tests/baselines/reference/bases.js
index a1499143fd4..529eacfad04 100644
--- a/tests/baselines/reference/bases.js
+++ b/tests/baselines/reference/bases.js
@@ -41,7 +41,7 @@ var B = (function () {
var C = (function (_super) {
__extends(C, _super);
function C() {
- var _this;
+ var _this = this;
_this.x;
any;
return _this;
diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js
index b31e773ff24..efd55a9ca18 100644
--- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js
+++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js
@@ -49,14 +49,14 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Base));
diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js
index 31d0c03a5dc..b68b5c3d97c 100644
--- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js
+++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js
@@ -45,14 +45,14 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Base));
diff --git a/tests/baselines/reference/bestCommonTypeOfTuple2.js b/tests/baselines/reference/bestCommonTypeOfTuple2.js
index 9b0c2be7b76..39712f873bc 100644
--- a/tests/baselines/reference/bestCommonTypeOfTuple2.js
+++ b/tests/baselines/reference/bestCommonTypeOfTuple2.js
@@ -51,7 +51,7 @@ var E = (function () {
var F = (function (_super) {
__extends(F, _super);
function F() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return F;
}(C));
@@ -64,7 +64,7 @@ var C1 = (function () {
var D1 = (function (_super) {
__extends(D1, _super);
function D1() {
- var _this = _super.apply(this, arguments) || this;
+ var _this = _super !== null && _super.apply(this, arguments) || this;
_this.i = "bar";
return _this;
}
diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js
index 74b5bafad38..a71613bc545 100644
--- a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js
+++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js
@@ -89,21 +89,21 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Derived));
var OtherDerived = (function (_super) {
__extends(OtherDerived, _super);
function OtherDerived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return OtherDerived;
}(Base));
diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js
index 84b7e2d0a52..7f9d616281b 100644
--- a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js
+++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js
@@ -136,21 +136,21 @@ var Errors;
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Derived));
var OtherDerived = (function (_super) {
__extends(OtherDerived, _super);
function OtherDerived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return OtherDerived;
}(Base));
diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js
index 04e8e2d6a2a..6c5d7508fc9 100644
--- a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js
+++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js
@@ -69,21 +69,21 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Derived));
var OtherDerived = (function (_super) {
__extends(OtherDerived, _super);
function OtherDerived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return OtherDerived;
}(Base));
diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js
index 9fabe405db0..fe260d62119 100644
--- a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js
+++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js
@@ -69,21 +69,21 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Derived));
var OtherDerived = (function (_super) {
__extends(OtherDerived, _super);
function OtherDerived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return OtherDerived;
}(Base));
diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js
index 52e08ae4401..c6054d2411d 100644
--- a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js
+++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js
@@ -72,21 +72,21 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Derived));
var OtherDerived = (function (_super) {
__extends(OtherDerived, _super);
function OtherDerived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return OtherDerived;
}(Base));
diff --git a/tests/baselines/reference/castingTuple.js b/tests/baselines/reference/castingTuple.js
index 4cff94b3b90..fea3bd9a238 100644
--- a/tests/baselines/reference/castingTuple.js
+++ b/tests/baselines/reference/castingTuple.js
@@ -64,7 +64,7 @@ var D = (function () {
var E = (function (_super) {
__extends(E, _super);
function E() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return E;
}(A));
@@ -72,7 +72,7 @@ var E = (function (_super) {
var F = (function (_super) {
__extends(F, _super);
function F() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return F;
}(A));
diff --git a/tests/baselines/reference/chainedAssignment3.js b/tests/baselines/reference/chainedAssignment3.js
index 116fcd0f83d..c85845f6d35 100644
--- a/tests/baselines/reference/chainedAssignment3.js
+++ b/tests/baselines/reference/chainedAssignment3.js
@@ -41,7 +41,7 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js
index fc23b30e197..99bd90139ae 100644
--- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js
+++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js
@@ -47,14 +47,14 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(B));
diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js
index 8c59c4d6682..bbe56823ee5 100644
--- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js
+++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js
@@ -29,7 +29,7 @@ var Based = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- var _this;
+ var _this = this;
_this.x = 100;
_this = _super.call(this) || this;
_this.x = 10;
diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js
index 1699b3a0f35..dc7e0309ab6 100644
--- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js
+++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js
@@ -34,7 +34,7 @@ var Based = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- var _this;
+ var _this = this;
var innver = (function () {
function innver() {
this.y = true;
diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js
index 49dfb6e4a22..b8240b27aea 100644
--- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js
+++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js
@@ -38,7 +38,7 @@ var Based = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- var _this;
+ var _this = this;
(function () {
_this; // No error
});
diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js
index 8931b0090cf..a40791a4eba 100644
--- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js
+++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js
@@ -33,7 +33,7 @@ var Base = (function () {
var Super = (function (_super) {
__extends(Super, _super);
function Super() {
- var _this;
+ var _this = this;
(function () { return _this; }); // No Error
_this = _super.call(this) || this;
return _this;
diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js
index 77e4a4096d0..92f13921d2a 100644
--- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js
+++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js
@@ -33,7 +33,7 @@ var Base = (function () {
var Super = (function (_super) {
__extends(Super, _super);
function Super() {
- var _this;
+ var _this = this;
var that = _this;
_this = _super.call(this) || this;
return _this;
diff --git a/tests/baselines/reference/circularImportAlias.js b/tests/baselines/reference/circularImportAlias.js
index 27be18c2a28..7c05d6dc3d3 100644
--- a/tests/baselines/reference/circularImportAlias.js
+++ b/tests/baselines/reference/circularImportAlias.js
@@ -37,7 +37,7 @@ var B;
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(B.a.C));
diff --git a/tests/baselines/reference/circularTypeofWithFunctionModule.js b/tests/baselines/reference/circularTypeofWithFunctionModule.js
index 38bced08608..a94de5d55e2 100644
--- a/tests/baselines/reference/circularTypeofWithFunctionModule.js
+++ b/tests/baselines/reference/circularTypeofWithFunctionModule.js
@@ -36,7 +36,7 @@ function maker(value) {
var Bar = (function (_super) {
__extends(Bar, _super);
function Bar() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Bar;
}(Foo));
diff --git a/tests/baselines/reference/classAbstractConstructorAssignability.js b/tests/baselines/reference/classAbstractConstructorAssignability.js
index 52335c203b2..5df6d169e04 100644
--- a/tests/baselines/reference/classAbstractConstructorAssignability.js
+++ b/tests/baselines/reference/classAbstractConstructorAssignability.js
@@ -33,14 +33,14 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(B));
diff --git a/tests/baselines/reference/classAbstractCrashedOnce.js b/tests/baselines/reference/classAbstractCrashedOnce.js
index dbad78fbd00..7801b61cdd9 100644
--- a/tests/baselines/reference/classAbstractCrashedOnce.js
+++ b/tests/baselines/reference/classAbstractCrashedOnce.js
@@ -29,7 +29,7 @@ var foo = (function () {
var bar = (function (_super) {
__extends(bar, _super);
function bar() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
bar.prototype.test = function () {
this.
diff --git a/tests/baselines/reference/classAbstractExtends.js b/tests/baselines/reference/classAbstractExtends.js
index e0fb7ad8189..69c962509db 100644
--- a/tests/baselines/reference/classAbstractExtends.js
+++ b/tests/baselines/reference/classAbstractExtends.js
@@ -36,28 +36,28 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(B));
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(B));
var E = (function (_super) {
__extends(E, _super);
function E() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
E.prototype.bar = function () { };
return E;
diff --git a/tests/baselines/reference/classAbstractFactoryFunction.js b/tests/baselines/reference/classAbstractFactoryFunction.js
index 89b77b62a9a..abc3235a3d3 100644
--- a/tests/baselines/reference/classAbstractFactoryFunction.js
+++ b/tests/baselines/reference/classAbstractFactoryFunction.js
@@ -36,7 +36,7 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
diff --git a/tests/baselines/reference/classAbstractGeneric.js b/tests/baselines/reference/classAbstractGeneric.js
index df6222f6495..6d20869ba73 100644
--- a/tests/baselines/reference/classAbstractGeneric.js
+++ b/tests/baselines/reference/classAbstractGeneric.js
@@ -44,28 +44,28 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(A)); // error -- inherits abstract methods
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(A)); // error -- inherits abstract methods
var E = (function (_super) {
__extends(E, _super);
function E() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
E.prototype.foo = function () { return this.t; };
return E;
@@ -73,7 +73,7 @@ var E = (function (_super) {
var F = (function (_super) {
__extends(F, _super);
function F() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
F.prototype.bar = function (t) { };
return F;
@@ -81,7 +81,7 @@ var F = (function (_super) {
var G = (function (_super) {
__extends(G, _super);
function G() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
G.prototype.foo = function () { return this.t; };
G.prototype.bar = function (t) { };
diff --git a/tests/baselines/reference/classAbstractInAModule.js b/tests/baselines/reference/classAbstractInAModule.js
index 86e6b8e3153..4bbe7a40dc5 100644
--- a/tests/baselines/reference/classAbstractInAModule.js
+++ b/tests/baselines/reference/classAbstractInAModule.js
@@ -29,7 +29,7 @@ var M;
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
diff --git a/tests/baselines/reference/classAbstractInheritance.js b/tests/baselines/reference/classAbstractInheritance.js
index a26a8170f53..a39ef662d76 100644
--- a/tests/baselines/reference/classAbstractInheritance.js
+++ b/tests/baselines/reference/classAbstractInheritance.js
@@ -40,14 +40,14 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(A));
@@ -59,42 +59,42 @@ var AA = (function () {
var BB = (function (_super) {
__extends(BB, _super);
function BB() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return BB;
}(AA));
var CC = (function (_super) {
__extends(CC, _super);
function CC() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return CC;
}(AA));
var DD = (function (_super) {
__extends(DD, _super);
function DD() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return DD;
}(BB));
var EE = (function (_super) {
__extends(EE, _super);
function EE() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return EE;
}(BB));
var FF = (function (_super) {
__extends(FF, _super);
function FF() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return FF;
}(CC));
var GG = (function (_super) {
__extends(GG, _super);
function GG() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return GG;
}(CC));
diff --git a/tests/baselines/reference/classAbstractInstantiations1.js b/tests/baselines/reference/classAbstractInstantiations1.js
index 101dca316df..6722665b62d 100644
--- a/tests/baselines/reference/classAbstractInstantiations1.js
+++ b/tests/baselines/reference/classAbstractInstantiations1.js
@@ -46,14 +46,14 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(B));
diff --git a/tests/baselines/reference/classAbstractInstantiations2.js b/tests/baselines/reference/classAbstractInstantiations2.js
index 8449689f84a..7d400c9fb05 100644
--- a/tests/baselines/reference/classAbstractInstantiations2.js
+++ b/tests/baselines/reference/classAbstractInstantiations2.js
@@ -87,21 +87,21 @@ new x; // okay -- undefined behavior at runtime
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(B)); // error -- not declared abstract
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(B)); // okay
var E = (function (_super) {
__extends(E, _super);
function E() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
E.prototype.bar = function () { return 1; };
return E;
@@ -109,7 +109,7 @@ var E = (function (_super) {
var F = (function (_super) {
__extends(F, _super);
function F() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
F.prototype.bar = function () { return 2; };
return F;
diff --git a/tests/baselines/reference/classAbstractOverrideWithAbstract.js b/tests/baselines/reference/classAbstractOverrideWithAbstract.js
index 345ce20ca1f..496dc7f241a 100644
--- a/tests/baselines/reference/classAbstractOverrideWithAbstract.js
+++ b/tests/baselines/reference/classAbstractOverrideWithAbstract.js
@@ -43,7 +43,7 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
@@ -56,7 +56,7 @@ var AA = (function () {
var BB = (function (_super) {
__extends(BB, _super);
function BB() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
BB.prototype.bar = function () { };
return BB;
@@ -64,14 +64,14 @@ var BB = (function (_super) {
var CC = (function (_super) {
__extends(CC, _super);
function CC() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return CC;
}(BB)); // error
var DD = (function (_super) {
__extends(DD, _super);
function DD() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
DD.prototype.foo = function () { };
return DD;
diff --git a/tests/baselines/reference/classAbstractSuperCalls.js b/tests/baselines/reference/classAbstractSuperCalls.js
index e569f90528e..125f5b3883f 100644
--- a/tests/baselines/reference/classAbstractSuperCalls.js
+++ b/tests/baselines/reference/classAbstractSuperCalls.js
@@ -47,7 +47,7 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
B.prototype.bar = function () { _super.prototype.foo.call(this); };
B.prototype.baz = function () { return this.foo; };
@@ -56,7 +56,7 @@ var B = (function (_super) {
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
C.prototype.foo = function () { return 2; };
C.prototype.qux = function () { return _super.prototype.foo.call(this) || _super.prototype.foo; }; // 2 errors, foo is abstract
@@ -73,7 +73,7 @@ var AA = (function () {
var BB = (function (_super) {
__extends(BB, _super);
function BB() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return BB;
}(AA));
diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethod1.js b/tests/baselines/reference/classAbstractUsingAbstractMethod1.js
index 61b5fd6fd13..8781fc6c05f 100644
--- a/tests/baselines/reference/classAbstractUsingAbstractMethod1.js
+++ b/tests/baselines/reference/classAbstractUsingAbstractMethod1.js
@@ -36,7 +36,7 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
B.prototype.foo = function () { return 1; };
return B;
@@ -44,7 +44,7 @@ var B = (function (_super) {
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(A));
diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js
index bd17fa96091..6016ab249f1 100644
--- a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js
+++ b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js
@@ -46,21 +46,21 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(A));
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
D.prototype.foo = function () { };
return D;
@@ -68,7 +68,7 @@ var D = (function (_super) {
var E = (function (_super) {
__extends(E, _super);
function E() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
E.prototype.foo = function () { };
return E;
@@ -81,21 +81,21 @@ var AA = (function () {
var BB = (function (_super) {
__extends(BB, _super);
function BB() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return BB;
}(AA));
var CC = (function (_super) {
__extends(CC, _super);
function CC() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return CC;
}(AA));
var DD = (function (_super) {
__extends(DD, _super);
function DD() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
DD.prototype.foo = function () { };
return DD;
diff --git a/tests/baselines/reference/classConstructorAccessibility4.js b/tests/baselines/reference/classConstructorAccessibility4.js
index 73451f5fab4..f6370729971 100644
--- a/tests/baselines/reference/classConstructorAccessibility4.js
+++ b/tests/baselines/reference/classConstructorAccessibility4.js
@@ -56,7 +56,7 @@ var A = (function () {
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(A));
@@ -78,7 +78,7 @@ var D = (function () {
var F = (function (_super) {
__extends(F, _super);
function F() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return F;
}(D));
diff --git a/tests/baselines/reference/classConstructorAccessibility5.js b/tests/baselines/reference/classConstructorAccessibility5.js
index a6738e229e0..d409265d89d 100644
--- a/tests/baselines/reference/classConstructorAccessibility5.js
+++ b/tests/baselines/reference/classConstructorAccessibility5.js
@@ -30,7 +30,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Derived.make = function () { new Base(); }; // ok
return Derived;
diff --git a/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js b/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js
index a7fa44091c8..4a0edb610d5 100644
--- a/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js
+++ b/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js
@@ -38,7 +38,7 @@ var M;
var O = (function (_super) {
__extends(O, _super);
function O() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return O;
}(M.N));
diff --git a/tests/baselines/reference/classDeclaredBeforeClassFactory.js b/tests/baselines/reference/classDeclaredBeforeClassFactory.js
index f6cc69037c4..40cfd576644 100644
--- a/tests/baselines/reference/classDeclaredBeforeClassFactory.js
+++ b/tests/baselines/reference/classDeclaredBeforeClassFactory.js
@@ -22,7 +22,7 @@ var __extends = (this && this.__extends) || (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(makeBaseClass()));
diff --git a/tests/baselines/reference/classDoesNotDependOnBaseTypes.js b/tests/baselines/reference/classDoesNotDependOnBaseTypes.js
index 9fc1aecd9b2..c1642125fe9 100644
--- a/tests/baselines/reference/classDoesNotDependOnBaseTypes.js
+++ b/tests/baselines/reference/classDoesNotDependOnBaseTypes.js
@@ -36,7 +36,7 @@ var StringTreeCollectionBase = (function () {
var StringTreeCollection = (function (_super) {
__extends(StringTreeCollection, _super);
function StringTreeCollection() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return StringTreeCollection;
}(StringTreeCollectionBase));
diff --git a/tests/baselines/reference/classExpression2.js b/tests/baselines/reference/classExpression2.js
index 6973fbec816..7f48463e81a 100644
--- a/tests/baselines/reference/classExpression2.js
+++ b/tests/baselines/reference/classExpression2.js
@@ -21,7 +21,7 @@ var D = (function () {
var v = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(D));
diff --git a/tests/baselines/reference/classExpression3.js b/tests/baselines/reference/classExpression3.js
index 858238d24ee..2582aa80398 100644
--- a/tests/baselines/reference/classExpression3.js
+++ b/tests/baselines/reference/classExpression3.js
@@ -20,7 +20,7 @@ var __extends = (this && this.__extends) || (function () {
var C = (function (_super) {
__extends(class_1, _super);
function class_1() {
- var _this = _super.apply(this, arguments) || this;
+ var _this = _super !== null && _super.apply(this, arguments) || this;
_this.c = 3;
return _this;
}
@@ -28,7 +28,7 @@ var C = (function (_super) {
}((function (_super) {
__extends(class_2, _super);
function class_2() {
- var _this = _super.apply(this, arguments) || this;
+ var _this = _super !== null && _super.apply(this, arguments) || this;
_this.b = 2;
return _this;
}
diff --git a/tests/baselines/reference/classExpressionExtendingAbstractClass.js b/tests/baselines/reference/classExpressionExtendingAbstractClass.js
index 1ce5078ed63..814753be4d7 100644
--- a/tests/baselines/reference/classExpressionExtendingAbstractClass.js
+++ b/tests/baselines/reference/classExpressionExtendingAbstractClass.js
@@ -27,7 +27,7 @@ var A = (function () {
var C = (function (_super) {
__extends(class_1, _super);
function class_1() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return class_1;
}(A));
diff --git a/tests/baselines/reference/classExtendingBuiltinType.js b/tests/baselines/reference/classExtendingBuiltinType.js
index 2ddf4c8961d..6fdead50a44 100644
--- a/tests/baselines/reference/classExtendingBuiltinType.js
+++ b/tests/baselines/reference/classExtendingBuiltinType.js
@@ -25,70 +25,70 @@ var __extends = (this && this.__extends) || (function () {
var C1 = (function (_super) {
__extends(C1, _super);
function C1() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C1;
}(Object));
var C2 = (function (_super) {
__extends(C2, _super);
function C2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
}(Function));
var C3 = (function (_super) {
__extends(C3, _super);
function C3() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C3;
}(String));
var C4 = (function (_super) {
__extends(C4, _super);
function C4() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C4;
}(Boolean));
var C5 = (function (_super) {
__extends(C5, _super);
function C5() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C5;
}(Number));
var C6 = (function (_super) {
__extends(C6, _super);
function C6() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C6;
}(Date));
var C7 = (function (_super) {
__extends(C7, _super);
function C7() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C7;
}(RegExp));
var C8 = (function (_super) {
__extends(C8, _super);
function C8() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C8;
}(Error));
var C9 = (function (_super) {
__extends(C9, _super);
function C9() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C9;
}(Array));
var C10 = (function (_super) {
__extends(C10, _super);
function C10() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C10;
}(Array));
diff --git a/tests/baselines/reference/classExtendingClass.js b/tests/baselines/reference/classExtendingClass.js
index 22bb12d95ec..52b415ccb77 100644
--- a/tests/baselines/reference/classExtendingClass.js
+++ b/tests/baselines/reference/classExtendingClass.js
@@ -52,7 +52,7 @@ var C = (function () {
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(C));
@@ -71,7 +71,7 @@ var C2 = (function () {
var D2 = (function (_super) {
__extends(D2, _super);
function D2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D2;
}(C2));
diff --git a/tests/baselines/reference/classExtendingClassLikeType.js b/tests/baselines/reference/classExtendingClassLikeType.js
index 564fd14da51..6ba82a0a08b 100644
--- a/tests/baselines/reference/classExtendingClassLikeType.js
+++ b/tests/baselines/reference/classExtendingClassLikeType.js
@@ -73,7 +73,7 @@ var __extends = (this && this.__extends) || (function () {
var D0 = (function (_super) {
__extends(D0, _super);
function D0() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D0;
}(Base));
@@ -112,7 +112,7 @@ var D3 = (function (_super) {
var D4 = (function (_super) {
__extends(D4, _super);
function D4() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D4;
}(getBase()));
@@ -120,7 +120,7 @@ var D4 = (function (_super) {
var D5 = (function (_super) {
__extends(D5, _super);
function D5() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D5;
}(getBadBase()));
diff --git a/tests/baselines/reference/classExtendingNonConstructor.js b/tests/baselines/reference/classExtendingNonConstructor.js
index 2a2e0b5eebc..bfe716b0029 100644
--- a/tests/baselines/reference/classExtendingNonConstructor.js
+++ b/tests/baselines/reference/classExtendingNonConstructor.js
@@ -32,49 +32,49 @@ function foo() {
var C1 = (function (_super) {
__extends(C1, _super);
function C1() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C1;
}(undefined));
var C2 = (function (_super) {
__extends(C2, _super);
function C2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
}(true));
var C3 = (function (_super) {
__extends(C3, _super);
function C3() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C3;
}(false));
var C4 = (function (_super) {
__extends(C4, _super);
function C4() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C4;
}(42));
var C5 = (function (_super) {
__extends(C5, _super);
function C5() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C5;
}("hello"));
var C6 = (function (_super) {
__extends(C6, _super);
function C6() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C6;
}(x));
var C7 = (function (_super) {
__extends(C7, _super);
function C7() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C7;
}(foo));
diff --git a/tests/baselines/reference/classExtendingNull.js b/tests/baselines/reference/classExtendingNull.js
index 4d9eaba615e..6725bcc7d9e 100644
--- a/tests/baselines/reference/classExtendingNull.js
+++ b/tests/baselines/reference/classExtendingNull.js
@@ -17,14 +17,12 @@ var __extends = (this && this.__extends) || (function () {
var C1 = (function (_super) {
__extends(C1, _super);
function C1() {
- return _super.apply(this, arguments) || this;
}
return C1;
}(null));
var C2 = (function (_super) {
__extends(C2, _super);
function C2() {
- return _super.apply(this, arguments) || this;
}
return C2;
}((null)));
diff --git a/tests/baselines/reference/classExtendingPrimitive.js b/tests/baselines/reference/classExtendingPrimitive.js
index ade53d91a74..fac6ada65ec 100644
--- a/tests/baselines/reference/classExtendingPrimitive.js
+++ b/tests/baselines/reference/classExtendingPrimitive.js
@@ -29,28 +29,28 @@ var __extends = (this && this.__extends) || (function () {
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(number));
var C2 = (function (_super) {
__extends(C2, _super);
function C2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
}(string));
var C3 = (function (_super) {
__extends(C3, _super);
function C3() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C3;
}(boolean));
var C4 = (function (_super) {
__extends(C4, _super);
function C4() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C4;
}(Void));
@@ -63,28 +63,27 @@ void {};
var C5 = (function (_super) {
__extends(C5, _super);
function C5() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C5;
}(Null));
var C5a = (function (_super) {
__extends(C5a, _super);
function C5a() {
- return _super.apply(this, arguments) || this;
}
return C5a;
}(null));
var C6 = (function (_super) {
__extends(C6, _super);
function C6() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C6;
}(undefined));
var C7 = (function (_super) {
__extends(C7, _super);
function C7() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C7;
}(Undefined));
@@ -95,7 +94,7 @@ var E;
var C8 = (function (_super) {
__extends(C8, _super);
function C8() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C8;
}(E));
diff --git a/tests/baselines/reference/classExtendingPrimitive2.js b/tests/baselines/reference/classExtendingPrimitive2.js
index 4e2c314b2dd..2b9cd6de6b6 100644
--- a/tests/baselines/reference/classExtendingPrimitive2.js
+++ b/tests/baselines/reference/classExtendingPrimitive2.js
@@ -25,7 +25,6 @@ void {};
var C5a = (function (_super) {
__extends(C5a, _super);
function C5a() {
- return _super.apply(this, arguments) || this;
}
return C5a;
}(null));
diff --git a/tests/baselines/reference/classExtendingQualifiedName.js b/tests/baselines/reference/classExtendingQualifiedName.js
index 59a84ba3e0a..24c61fd0bd6 100644
--- a/tests/baselines/reference/classExtendingQualifiedName.js
+++ b/tests/baselines/reference/classExtendingQualifiedName.js
@@ -28,7 +28,7 @@ var M;
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(M.C));
diff --git a/tests/baselines/reference/classExtendingQualifiedName2.js b/tests/baselines/reference/classExtendingQualifiedName2.js
index b2b91a9aedb..633cd4d9ef4 100644
--- a/tests/baselines/reference/classExtendingQualifiedName2.js
+++ b/tests/baselines/reference/classExtendingQualifiedName2.js
@@ -29,7 +29,7 @@ var M;
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(M.C));
diff --git a/tests/baselines/reference/classExtendsAcrossFiles.js b/tests/baselines/reference/classExtendsAcrossFiles.js
index e8d4c530da1..6fcce5c5982 100644
--- a/tests/baselines/reference/classExtendsAcrossFiles.js
+++ b/tests/baselines/reference/classExtendsAcrossFiles.js
@@ -42,7 +42,7 @@ exports.b = {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
@@ -72,7 +72,7 @@ exports.a = {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
diff --git a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js
index fb44ad9469a..3b835f86755 100644
--- a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js
+++ b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js
@@ -37,7 +37,7 @@ var Foo;
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
diff --git a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js
index d70305fe5ba..d0377bdfc18 100644
--- a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js
+++ b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js
@@ -28,7 +28,7 @@ var Foo;
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
diff --git a/tests/baselines/reference/classExtendsEveryObjectType.js b/tests/baselines/reference/classExtendsEveryObjectType.js
index ef16075c727..946f2c70f91 100644
--- a/tests/baselines/reference/classExtendsEveryObjectType.js
+++ b/tests/baselines/reference/classExtendsEveryObjectType.js
@@ -30,14 +30,14 @@ var __extends = (this && this.__extends) || (function () {
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(I)); // error
var C2 = (function (_super) {
__extends(C2, _super);
function C2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
}({ foo: string })); // error
@@ -45,7 +45,7 @@ var x;
var C3 = (function (_super) {
__extends(C3, _super);
function C3() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C3;
}(x)); // error
@@ -56,7 +56,7 @@ var M;
var C4 = (function (_super) {
__extends(C4, _super);
function C4() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C4;
}(M)); // error
@@ -64,14 +64,14 @@ function foo() { }
var C5 = (function (_super) {
__extends(C5, _super);
function C5() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C5;
}(foo)); // error
var C6 = (function (_super) {
__extends(C6, _super);
function C6() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C6;
}([])); // error
diff --git a/tests/baselines/reference/classExtendsEveryObjectType2.js b/tests/baselines/reference/classExtendsEveryObjectType2.js
index 507a9bbfcf9..d8dbdbb5721 100644
--- a/tests/baselines/reference/classExtendsEveryObjectType2.js
+++ b/tests/baselines/reference/classExtendsEveryObjectType2.js
@@ -17,14 +17,14 @@ var __extends = (this && this.__extends) || (function () {
var C2 = (function (_super) {
__extends(C2, _super);
function C2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
}({ foo: string })); // error
var C6 = (function (_super) {
__extends(C6, _super);
function C6() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C6;
}([])); // error
diff --git a/tests/baselines/reference/classExtendsInterface.js b/tests/baselines/reference/classExtendsInterface.js
index f291aedb4ec..cd86c42ae0b 100644
--- a/tests/baselines/reference/classExtendsInterface.js
+++ b/tests/baselines/reference/classExtendsInterface.js
@@ -22,7 +22,7 @@ var __extends = (this && this.__extends) || (function () {
var A = (function (_super) {
__extends(A, _super);
function A() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return A;
}(Comparable));
@@ -34,7 +34,7 @@ var B = (function () {
var A2 = (function (_super) {
__extends(A2, _super);
function A2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return A2;
}(Comparable2));
diff --git a/tests/baselines/reference/classExtendsInterfaceInExpression.js b/tests/baselines/reference/classExtendsInterfaceInExpression.js
index b37daba7f7a..1bbdae0370e 100644
--- a/tests/baselines/reference/classExtendsInterfaceInExpression.js
+++ b/tests/baselines/reference/classExtendsInterfaceInExpression.js
@@ -25,7 +25,7 @@ function factory(a) {
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(factory(A)));
diff --git a/tests/baselines/reference/classExtendsInterfaceInModule.js b/tests/baselines/reference/classExtendsInterfaceInModule.js
index 2299df89ab7..96b2906e54f 100644
--- a/tests/baselines/reference/classExtendsInterfaceInModule.js
+++ b/tests/baselines/reference/classExtendsInterfaceInModule.js
@@ -29,21 +29,21 @@ var __extends = (this && this.__extends) || (function () {
var C1 = (function (_super) {
__extends(C1, _super);
function C1() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C1;
}(M.I1));
var C2 = (function (_super) {
__extends(C2, _super);
function C2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
}(M.I2));
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(Mod.Nested.I));
diff --git a/tests/baselines/reference/classExtendsItself.js b/tests/baselines/reference/classExtendsItself.js
index 8f6aecec843..197f76edb80 100644
--- a/tests/baselines/reference/classExtendsItself.js
+++ b/tests/baselines/reference/classExtendsItself.js
@@ -19,21 +19,21 @@ var __extends = (this && this.__extends) || (function () {
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(C)); // error
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(D)); // error
var E = (function (_super) {
__extends(E, _super);
function E() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return E;
}(E)); // error
diff --git a/tests/baselines/reference/classExtendsItselfIndirectly.js b/tests/baselines/reference/classExtendsItselfIndirectly.js
index 4ca9186f89c..e5bd50ae80a 100644
--- a/tests/baselines/reference/classExtendsItselfIndirectly.js
+++ b/tests/baselines/reference/classExtendsItselfIndirectly.js
@@ -25,42 +25,42 @@ var __extends = (this && this.__extends) || (function () {
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(E)); // error
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(C));
var E = (function (_super) {
__extends(E, _super);
function E() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return E;
}(D));
var C2 = (function (_super) {
__extends(C2, _super);
function C2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
}(E2)); // error
var D2 = (function (_super) {
__extends(D2, _super);
function D2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D2;
}(C2));
var E2 = (function (_super) {
__extends(E2, _super);
function E2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return E2;
}(D2));
diff --git a/tests/baselines/reference/classExtendsItselfIndirectly2.js b/tests/baselines/reference/classExtendsItselfIndirectly2.js
index 86d2cd60887..ae3bf4ed788 100644
--- a/tests/baselines/reference/classExtendsItselfIndirectly2.js
+++ b/tests/baselines/reference/classExtendsItselfIndirectly2.js
@@ -36,7 +36,7 @@ var __extends = (this && this.__extends) || (function () {
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(N.E)); // error
@@ -45,7 +45,7 @@ var M;
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(C));
@@ -56,7 +56,7 @@ var N;
var E = (function (_super) {
__extends(E, _super);
function E() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return E;
}(M.D));
@@ -67,7 +67,7 @@ var O;
var C2 = (function (_super) {
__extends(C2, _super);
function C2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
}(Q.E2)); // error
@@ -76,7 +76,7 @@ var O;
var D2 = (function (_super) {
__extends(D2, _super);
function D2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D2;
}(C2));
@@ -87,7 +87,7 @@ var O;
var E2 = (function (_super) {
__extends(E2, _super);
function E2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return E2;
}(P.D2));
diff --git a/tests/baselines/reference/classExtendsItselfIndirectly3.js b/tests/baselines/reference/classExtendsItselfIndirectly3.js
index 1c42dc28634..8f004a44cfe 100644
--- a/tests/baselines/reference/classExtendsItselfIndirectly3.js
+++ b/tests/baselines/reference/classExtendsItselfIndirectly3.js
@@ -32,7 +32,7 @@ var __extends = (this && this.__extends) || (function () {
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(E)); // error
@@ -50,7 +50,7 @@ var __extends = (this && this.__extends) || (function () {
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(C));
@@ -68,7 +68,7 @@ var __extends = (this && this.__extends) || (function () {
var E = (function (_super) {
__extends(E, _super);
function E() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return E;
}(D));
@@ -86,7 +86,7 @@ var __extends = (this && this.__extends) || (function () {
var C2 = (function (_super) {
__extends(C2, _super);
function C2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
}(E2)); // error
@@ -104,7 +104,7 @@ var __extends = (this && this.__extends) || (function () {
var D2 = (function (_super) {
__extends(D2, _super);
function D2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D2;
}(C2));
@@ -122,7 +122,7 @@ var __extends = (this && this.__extends) || (function () {
var E2 = (function (_super) {
__extends(E2, _super);
function E2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return E2;
}(D2));
diff --git a/tests/baselines/reference/classExtendsMultipleBaseClasses.js b/tests/baselines/reference/classExtendsMultipleBaseClasses.js
index a36ab4355ad..830bf6fb988 100644
--- a/tests/baselines/reference/classExtendsMultipleBaseClasses.js
+++ b/tests/baselines/reference/classExtendsMultipleBaseClasses.js
@@ -27,7 +27,7 @@ var B = (function () {
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(A));
diff --git a/tests/baselines/reference/classExtendsNull.js b/tests/baselines/reference/classExtendsNull.js
index 07618bead38..674b212f98e 100644
--- a/tests/baselines/reference/classExtendsNull.js
+++ b/tests/baselines/reference/classExtendsNull.js
@@ -26,7 +26,7 @@ var __extends = (this && this.__extends) || (function () {
var C = (function (_super) {
__extends(C, _super);
function C() {
- var _this = _super.call(this) || this;
+ _this = _super.call(this) || this;
return Object.create(null);
}
return C;
@@ -34,7 +34,6 @@ var C = (function (_super) {
var D = (function (_super) {
__extends(D, _super);
function D() {
- var _this;
return Object.create(null);
}
return D;
diff --git a/tests/baselines/reference/classExtendsShadowedConstructorFunction.js b/tests/baselines/reference/classExtendsShadowedConstructorFunction.js
index 908c91850e8..391a6e52fa3 100644
--- a/tests/baselines/reference/classExtendsShadowedConstructorFunction.js
+++ b/tests/baselines/reference/classExtendsShadowedConstructorFunction.js
@@ -30,7 +30,7 @@ var M;
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(C));
diff --git a/tests/baselines/reference/classExtendsValidConstructorFunction.js b/tests/baselines/reference/classExtendsValidConstructorFunction.js
index fbbb91d29ea..e6f9b389739 100644
--- a/tests/baselines/reference/classExtendsValidConstructorFunction.js
+++ b/tests/baselines/reference/classExtendsValidConstructorFunction.js
@@ -21,7 +21,7 @@ var x = new foo(); // can be used as a constructor function
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(foo)); // error, cannot extend it though
diff --git a/tests/baselines/reference/classHeritageWithTrailingSeparator.js b/tests/baselines/reference/classHeritageWithTrailingSeparator.js
index 72779e9eb97..4d863741ada 100644
--- a/tests/baselines/reference/classHeritageWithTrailingSeparator.js
+++ b/tests/baselines/reference/classHeritageWithTrailingSeparator.js
@@ -22,7 +22,7 @@ var C = (function () {
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(C));
diff --git a/tests/baselines/reference/classImplementsClass2.js b/tests/baselines/reference/classImplementsClass2.js
index 80acbd8d204..330a9a7dece 100644
--- a/tests/baselines/reference/classImplementsClass2.js
+++ b/tests/baselines/reference/classImplementsClass2.js
@@ -38,7 +38,7 @@ var C = (function () {
var C2 = (function (_super) {
__extends(C2, _super);
function C2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
C2.prototype.foo = function () {
return 1;
diff --git a/tests/baselines/reference/classImplementsClass3.js b/tests/baselines/reference/classImplementsClass3.js
index 4c2d096f465..649afb528a3 100644
--- a/tests/baselines/reference/classImplementsClass3.js
+++ b/tests/baselines/reference/classImplementsClass3.js
@@ -42,7 +42,7 @@ var C = (function () {
var C2 = (function (_super) {
__extends(C2, _super);
function C2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
}(A));
diff --git a/tests/baselines/reference/classImplementsClass4.js b/tests/baselines/reference/classImplementsClass4.js
index 49c43b8ef3a..0d7a8661ed1 100644
--- a/tests/baselines/reference/classImplementsClass4.js
+++ b/tests/baselines/reference/classImplementsClass4.js
@@ -45,7 +45,7 @@ var C = (function () {
var C2 = (function (_super) {
__extends(C2, _super);
function C2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
}(A));
diff --git a/tests/baselines/reference/classImplementsClass5.js b/tests/baselines/reference/classImplementsClass5.js
index a10b08fad2d..4b5229bdfc6 100644
--- a/tests/baselines/reference/classImplementsClass5.js
+++ b/tests/baselines/reference/classImplementsClass5.js
@@ -47,7 +47,7 @@ var C = (function () {
var C2 = (function (_super) {
__extends(C2, _super);
function C2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
}(A));
diff --git a/tests/baselines/reference/classImplementsClass6.js b/tests/baselines/reference/classImplementsClass6.js
index ec814464801..fb42e9451a7 100644
--- a/tests/baselines/reference/classImplementsClass6.js
+++ b/tests/baselines/reference/classImplementsClass6.js
@@ -52,7 +52,7 @@ var C = (function () {
var C2 = (function (_super) {
__extends(C2, _super);
function C2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
}(A));
diff --git a/tests/baselines/reference/classIndexer3.js b/tests/baselines/reference/classIndexer3.js
index f50c50e4c90..344baf039e1 100644
--- a/tests/baselines/reference/classIndexer3.js
+++ b/tests/baselines/reference/classIndexer3.js
@@ -29,7 +29,7 @@ var C123 = (function () {
var D123 = (function (_super) {
__extends(D123, _super);
function D123() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D123;
}(C123));
diff --git a/tests/baselines/reference/classInheritence.js b/tests/baselines/reference/classInheritence.js
index 61a2ce9f262..a43cf9c8bb8 100644
--- a/tests/baselines/reference/classInheritence.js
+++ b/tests/baselines/reference/classInheritence.js
@@ -16,14 +16,14 @@ var __extends = (this && this.__extends) || (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
var A = (function (_super) {
__extends(A, _super);
function A() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return A;
}(A));
diff --git a/tests/baselines/reference/classIsSubtypeOfBaseType.js b/tests/baselines/reference/classIsSubtypeOfBaseType.js
index ec7a1f1babf..adfa94b4b7e 100644
--- a/tests/baselines/reference/classIsSubtypeOfBaseType.js
+++ b/tests/baselines/reference/classIsSubtypeOfBaseType.js
@@ -34,14 +34,14 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Base));
diff --git a/tests/baselines/reference/classOrder2.js b/tests/baselines/reference/classOrder2.js
index e7dd6959731..897089b8b57 100644
--- a/tests/baselines/reference/classOrder2.js
+++ b/tests/baselines/reference/classOrder2.js
@@ -33,7 +33,7 @@ var __extends = (this && this.__extends) || (function () {
var A = (function (_super) {
__extends(A, _super);
function A() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
A.prototype.foo = function () { this.bar(); };
return A;
diff --git a/tests/baselines/reference/classOrderBug.js b/tests/baselines/reference/classOrderBug.js
index 5631152514f..71f407a14f5 100644
--- a/tests/baselines/reference/classOrderBug.js
+++ b/tests/baselines/reference/classOrderBug.js
@@ -40,7 +40,7 @@ var baz = (function () {
var foo = (function (_super) {
__extends(foo, _super);
function foo() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return foo;
}(baz));
diff --git a/tests/baselines/reference/classSideInheritance1.js b/tests/baselines/reference/classSideInheritance1.js
index cb958b2e12e..549d9451199 100644
--- a/tests/baselines/reference/classSideInheritance1.js
+++ b/tests/baselines/reference/classSideInheritance1.js
@@ -38,7 +38,7 @@ var A = (function () {
var C2 = (function (_super) {
__extends(C2, _super);
function C2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
}(A));
diff --git a/tests/baselines/reference/classUpdateTests.js b/tests/baselines/reference/classUpdateTests.js
index eb9541ab737..84a619d0461 100644
--- a/tests/baselines/reference/classUpdateTests.js
+++ b/tests/baselines/reference/classUpdateTests.js
@@ -162,7 +162,7 @@ var D = (function () {
var E = (function (_super) {
__extends(E, _super);
function E() {
- var _this = _super.apply(this, arguments) || this;
+ var _this = _super !== null && _super.apply(this, arguments) || this;
_this.p1 = 0;
return _this;
}
@@ -171,7 +171,7 @@ var E = (function (_super) {
var F = (function (_super) {
__extends(F, _super);
function F() {
- var _this;
+ var _this = this;
return _this;
} // ERROR - super call required
return F;
@@ -210,7 +210,7 @@ var J = (function (_super) {
var K = (function (_super) {
__extends(K, _super);
function K(p1) {
- var _this;
+ var _this = this;
_this.p1 = p1;
var i = 0;
_this = _super.call(this) || this;
@@ -230,7 +230,7 @@ var L = (function (_super) {
var M = (function (_super) {
__extends(M, _super);
function M(p1) {
- var _this;
+ var _this = this;
_this.p1 = p1;
var i = 0;
_this = _super.call(this) || this;
diff --git a/tests/baselines/reference/classWithBaseClassButNoConstructor.js b/tests/baselines/reference/classWithBaseClassButNoConstructor.js
index 249fa099007..a9f7fbc7700 100644
--- a/tests/baselines/reference/classWithBaseClassButNoConstructor.js
+++ b/tests/baselines/reference/classWithBaseClassButNoConstructor.js
@@ -59,7 +59,7 @@ var Base = (function () {
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(Base));
@@ -74,7 +74,7 @@ var Base2 = (function () {
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(Base2));
@@ -85,7 +85,7 @@ var d2 = new D(1); // ok
var D2 = (function (_super) {
__extends(D2, _super);
function D2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D2;
}(Base2));
@@ -95,7 +95,7 @@ var d4 = new D(1); // ok
var D3 = (function (_super) {
__extends(D3, _super);
function D3() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D3;
}(Base2));
diff --git a/tests/baselines/reference/classWithConstructors.js b/tests/baselines/reference/classWithConstructors.js
index 07b592bf730..822f1e3014f 100644
--- a/tests/baselines/reference/classWithConstructors.js
+++ b/tests/baselines/reference/classWithConstructors.js
@@ -80,7 +80,7 @@ var NonGeneric;
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(C2));
@@ -108,7 +108,7 @@ var Generics;
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(C2));
diff --git a/tests/baselines/reference/classWithProtectedProperty.js b/tests/baselines/reference/classWithProtectedProperty.js
index 0a2bb39b449..2b12741d38f 100644
--- a/tests/baselines/reference/classWithProtectedProperty.js
+++ b/tests/baselines/reference/classWithProtectedProperty.js
@@ -53,7 +53,7 @@ C.g = function () { return ''; };
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
D.prototype.method = function () {
// No errors
diff --git a/tests/baselines/reference/classWithStaticMembers.js b/tests/baselines/reference/classWithStaticMembers.js
index 0e08046f8c2..e4f4805b42f 100644
--- a/tests/baselines/reference/classWithStaticMembers.js
+++ b/tests/baselines/reference/classWithStaticMembers.js
@@ -50,7 +50,7 @@ var r3 = r.foo;
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(C));
diff --git a/tests/baselines/reference/classdecl.js b/tests/baselines/reference/classdecl.js
index 97ccd8e1410..e1e1313dae2 100644
--- a/tests/baselines/reference/classdecl.js
+++ b/tests/baselines/reference/classdecl.js
@@ -141,7 +141,7 @@ var a = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return b;
}(a));
@@ -166,7 +166,7 @@ var m2;
var c = (function (_super) {
__extends(c, _super);
function c() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return c;
}(b));
@@ -182,7 +182,7 @@ var m2;
var c = (function (_super) {
__extends(c, _super);
function c() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return c;
}(m1.b));
diff --git a/tests/baselines/reference/clodulesDerivedClasses.js b/tests/baselines/reference/clodulesDerivedClasses.js
index a622261b685..e643ed17578 100644
--- a/tests/baselines/reference/clodulesDerivedClasses.js
+++ b/tests/baselines/reference/clodulesDerivedClasses.js
@@ -48,7 +48,7 @@ var Shape = (function () {
var Path = (function (_super) {
__extends(Path, _super);
function Path() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Path;
}(Shape));
diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js
index 5f7fc0cccdf..7d8e23cd508 100644
--- a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js
+++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js
@@ -73,7 +73,7 @@ var Foo = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(b.prototype, "prop2", {
get: function () {
@@ -93,7 +93,7 @@ var b = (function (_super) {
var c = (function (_super) {
__extends(c, _super);
function c() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(c.prototype, "prop2", {
get: function () {
diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js
index 1401411ad8e..b211b3e4eac 100644
--- a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js
+++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js
@@ -55,7 +55,7 @@ var Foo = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
b.prototype.foo = function () {
function _super() {
@@ -68,7 +68,7 @@ var b = (function (_super) {
var c = (function (_super) {
__extends(c, _super);
function c() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
c.prototype.foo = function () {
var x = function () {
diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js
index 99fe7e8dcef..9701e9b4fc4 100644
--- a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js
+++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js
@@ -45,7 +45,7 @@ var Foo = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- var _this = _super.apply(this, arguments) || this;
+ var _this = _super !== null && _super.apply(this, arguments) || this;
_this.prop2 = {
doStuff: function () {
function _super() {
diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js
index 3278f9bd3a8..3a6e8b9e772 100644
--- a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js
+++ b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js
@@ -63,7 +63,7 @@ var Foo = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(b.prototype, "prop2", {
get: function () {
@@ -81,7 +81,7 @@ var b = (function (_super) {
var c = (function (_super) {
__extends(c, _super);
function c() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(c.prototype, "prop2", {
get: function () {
diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js
index 541035dd43b..c6cce551d93 100644
--- a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js
+++ b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js
@@ -41,7 +41,7 @@ var Foo = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
b.prototype.foo = function () {
var _super = 10; // Should be error
@@ -51,7 +51,7 @@ var b = (function (_super) {
var c = (function (_super) {
__extends(c, _super);
function c() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
c.prototype.foo = function () {
var x = function () {
diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js
index 8371687ff34..b88513b53dd 100644
--- a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js
+++ b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js
@@ -43,7 +43,7 @@ var Foo = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- var _this = _super.apply(this, arguments) || this;
+ var _this = _super !== null && _super.apply(this, arguments) || this;
_this.prop2 = {
doStuff: function () {
var _super = 10; // Should be error
diff --git a/tests/baselines/reference/collisionSuperAndNameResolution.js b/tests/baselines/reference/collisionSuperAndNameResolution.js
index 165943ec132..c35c30ec84e 100644
--- a/tests/baselines/reference/collisionSuperAndNameResolution.js
+++ b/tests/baselines/reference/collisionSuperAndNameResolution.js
@@ -32,7 +32,7 @@ var base = (function () {
var Foo = (function (_super) {
__extends(Foo, _super);
function Foo() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Foo.prototype.x = function () {
console.log(_super); // Error as this doesnt not resolve to user defined _super
diff --git a/tests/baselines/reference/collisionSuperAndParameter1.js b/tests/baselines/reference/collisionSuperAndParameter1.js
index 818f15b3f15..8bc3fc19b5b 100644
--- a/tests/baselines/reference/collisionSuperAndParameter1.js
+++ b/tests/baselines/reference/collisionSuperAndParameter1.js
@@ -28,7 +28,7 @@ var Foo = (function () {
var Foo2 = (function (_super) {
__extends(Foo2, _super);
function Foo2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Foo2.prototype.x = function () {
var lambda = function (_super) {
diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js
index a5e68e4eaab..d0d5059adec 100644
--- a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js
+++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js
@@ -39,7 +39,7 @@ var a = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
b.prototype.foo = function () {
var _this = this;
@@ -51,7 +51,7 @@ var b = (function (_super) {
var b2 = (function (_super) {
__extends(b2, _super);
function b2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
b2.prototype.foo = function () {
var _this = this;
diff --git a/tests/baselines/reference/commentsInheritance.js b/tests/baselines/reference/commentsInheritance.js
index 26150c60d12..53fcab2cf3f 100644
--- a/tests/baselines/reference/commentsInheritance.js
+++ b/tests/baselines/reference/commentsInheritance.js
@@ -263,7 +263,7 @@ c2_i = c3_i;
var c4 = (function (_super) {
__extends(c4, _super);
function c4() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return c4;
}(c2));
diff --git a/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js
index 39a53a241c9..f017fe974bc 100644
--- a/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js
+++ b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js
@@ -232,14 +232,14 @@ var Base = (function () {
var A2 = (function (_super) {
__extends(A2, _super);
function A2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return A2;
}(Base));
var B2 = (function (_super) {
__extends(B2, _super);
function B2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B2;
}(Base));
diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js
index 63bd4442479..b63b2fa7110 100644
--- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js
+++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js
@@ -187,7 +187,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js
index 05657e3ec5e..cecdb97e164 100644
--- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js
+++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js
@@ -187,7 +187,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js
index 685fb769e99..6fc8effabd0 100644
--- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js
+++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js
@@ -130,7 +130,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js
index 48d598efe26..fd9f0ffabe1 100644
--- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js
+++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js
@@ -168,7 +168,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js
index c5e512a735b..5898bdd6f2b 100644
--- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js
+++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js
@@ -168,7 +168,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js
index e93fc8c7b50..1a3bdca7d95 100644
--- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js
+++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js
@@ -278,7 +278,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js
index a0e7b1a424e..8f23651af05 100644
--- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js
+++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js
@@ -240,7 +240,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js
index e8d706eb290..b77b5dd6e4a 100644
--- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js
+++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js
@@ -126,7 +126,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js
index 51e077113dd..b82063b4aed 100644
--- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js
+++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js
@@ -183,7 +183,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js
index 86c6fb86be2..d83b7b2d5c0 100644
--- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js
+++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js
@@ -183,7 +183,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js
index 2cd9fc1bb29..e0befa2237e 100644
--- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js
+++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js
@@ -97,7 +97,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
@@ -119,7 +119,7 @@ var A2 = (function () {
var B2 = (function (_super) {
__extends(B2, _super);
function B2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B2;
}(A2));
diff --git a/tests/baselines/reference/complexClassRelationships.js b/tests/baselines/reference/complexClassRelationships.js
index 8a865e2d024..2bc345bd499 100644
--- a/tests/baselines/reference/complexClassRelationships.js
+++ b/tests/baselines/reference/complexClassRelationships.js
@@ -62,7 +62,7 @@ var __extends = (this && this.__extends) || (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Derived.createEmpty = function () {
var item = new Derived();
diff --git a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js
index 5af6a97f781..bc9bbcdaa16 100644
--- a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js
+++ b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js
@@ -19,7 +19,7 @@ var __extends = (this && this.__extends) || (function () {
var S18 = (function (_super) {
__extends(S18, _super);
function S18() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return S18;
}(S18));
diff --git a/tests/baselines/reference/computedPropertyNames24_ES5.js b/tests/baselines/reference/computedPropertyNames24_ES5.js
index ab1d81e8fb0..dd229bdcae2 100644
--- a/tests/baselines/reference/computedPropertyNames24_ES5.js
+++ b/tests/baselines/reference/computedPropertyNames24_ES5.js
@@ -30,7 +30,7 @@ var Base = (function () {
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
C.prototype[_super.bar.call(this)] = function () { };
return C;
diff --git a/tests/baselines/reference/computedPropertyNames25_ES5.js b/tests/baselines/reference/computedPropertyNames25_ES5.js
index 6443c3cedb2..18ee07301e7 100644
--- a/tests/baselines/reference/computedPropertyNames25_ES5.js
+++ b/tests/baselines/reference/computedPropertyNames25_ES5.js
@@ -35,7 +35,7 @@ var Base = (function () {
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
C.prototype.foo = function () {
var obj = (_a = {},
diff --git a/tests/baselines/reference/computedPropertyNames26_ES5.js b/tests/baselines/reference/computedPropertyNames26_ES5.js
index a34bcef3b3d..78a7ef3af77 100644
--- a/tests/baselines/reference/computedPropertyNames26_ES5.js
+++ b/tests/baselines/reference/computedPropertyNames26_ES5.js
@@ -32,7 +32,7 @@ var Base = (function () {
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
C.prototype[(_a = {}, _a[_super.bar.call(this)] = 1, _a)[0]] = function () { };
return C;
diff --git a/tests/baselines/reference/computedPropertyNames27_ES5.js b/tests/baselines/reference/computedPropertyNames27_ES5.js
index 00d9c9f0f43..9af56a8835b 100644
--- a/tests/baselines/reference/computedPropertyNames27_ES5.js
+++ b/tests/baselines/reference/computedPropertyNames27_ES5.js
@@ -24,7 +24,7 @@ var Base = (function () {
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
C.prototype[(_this = _super.call(this) || this, "prop")] = function () { };
return C;
diff --git a/tests/baselines/reference/computedPropertyNames31_ES5.js b/tests/baselines/reference/computedPropertyNames31_ES5.js
index fd0db774e71..95caabc4bda 100644
--- a/tests/baselines/reference/computedPropertyNames31_ES5.js
+++ b/tests/baselines/reference/computedPropertyNames31_ES5.js
@@ -37,7 +37,7 @@ var Base = (function () {
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
C.prototype.foo = function () {
var _this = this;
diff --git a/tests/baselines/reference/computedPropertyNames43_ES5.js b/tests/baselines/reference/computedPropertyNames43_ES5.js
index e49d4426cf7..100683519ec 100644
--- a/tests/baselines/reference/computedPropertyNames43_ES5.js
+++ b/tests/baselines/reference/computedPropertyNames43_ES5.js
@@ -41,7 +41,7 @@ var C = (function () {
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(D.prototype, "get1", {
// Computed properties
diff --git a/tests/baselines/reference/computedPropertyNames44_ES5.js b/tests/baselines/reference/computedPropertyNames44_ES5.js
index 46029ee5475..0291e337591 100644
--- a/tests/baselines/reference/computedPropertyNames44_ES5.js
+++ b/tests/baselines/reference/computedPropertyNames44_ES5.js
@@ -45,7 +45,7 @@ var C = (function () {
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(D.prototype, "set1", {
set: function (p) { },
diff --git a/tests/baselines/reference/computedPropertyNames45_ES5.js b/tests/baselines/reference/computedPropertyNames45_ES5.js
index 7108935ab9e..3bc7e6e350d 100644
--- a/tests/baselines/reference/computedPropertyNames45_ES5.js
+++ b/tests/baselines/reference/computedPropertyNames45_ES5.js
@@ -46,7 +46,7 @@ var C = (function () {
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(D.prototype, "set1", {
set: function (p) { },
diff --git a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js
index 5c948261bb2..5d864bce0d6 100644
--- a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js
+++ b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js
@@ -68,7 +68,7 @@ var X = (function () {
var A = (function (_super) {
__extends(A, _super);
function A() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return A;
}(X));
@@ -76,7 +76,7 @@ var A = (function (_super) {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(X));
diff --git a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js
index 01b0fe327fa..b5715163ad5 100644
--- a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js
+++ b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js
@@ -44,7 +44,7 @@ var X = (function () {
var A = (function (_super) {
__extends(A, _super);
function A() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return A;
}(X));
@@ -52,7 +52,7 @@ var A = (function (_super) {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(X));
diff --git a/tests/baselines/reference/constantOverloadFunction.js b/tests/baselines/reference/constantOverloadFunction.js
index e204db38c28..f501623bae5 100644
--- a/tests/baselines/reference/constantOverloadFunction.js
+++ b/tests/baselines/reference/constantOverloadFunction.js
@@ -33,7 +33,7 @@ var Base = (function () {
var Derived1 = (function (_super) {
__extends(Derived1, _super);
function Derived1() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Derived1.prototype.bar = function () { };
return Derived1;
@@ -41,7 +41,7 @@ var Derived1 = (function (_super) {
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Derived2.prototype.baz = function () { };
return Derived2;
@@ -49,7 +49,7 @@ var Derived2 = (function (_super) {
var Derived3 = (function (_super) {
__extends(Derived3, _super);
function Derived3() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Derived3.prototype.biz = function () { };
return Derived3;
diff --git a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js
index 22ca8603ffb..2a86fb0c9a3 100644
--- a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js
+++ b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js
@@ -34,7 +34,7 @@ var Base = (function () {
var Derived1 = (function (_super) {
__extends(Derived1, _super);
function Derived1() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Derived1.prototype.bar = function () { };
return Derived1;
@@ -42,7 +42,7 @@ var Derived1 = (function (_super) {
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Derived2.prototype.baz = function () { };
return Derived2;
@@ -50,7 +50,7 @@ var Derived2 = (function (_super) {
var Derived3 = (function (_super) {
__extends(Derived3, _super);
function Derived3() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Derived3.prototype.biz = function () { };
return Derived3;
diff --git a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js
index 074cfa49b47..5b69a2dfae1 100644
--- a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js
+++ b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js
@@ -45,7 +45,7 @@ var GenericBase = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(GenericBase));
diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js
index 53ba73b8ba9..742a03577e5 100644
--- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js
+++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js
@@ -89,21 +89,21 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Derived));
var OtherDerived = (function (_super) {
__extends(OtherDerived, _super);
function OtherDerived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return OtherDerived;
}(Base));
diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js
index f6629487ff5..fd083159fb1 100644
--- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js
+++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js
@@ -134,21 +134,21 @@ var Errors;
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Derived));
var OtherDerived = (function (_super) {
__extends(OtherDerived, _super);
function OtherDerived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return OtherDerived;
}(Base));
diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js
index 3c20e2f96b5..f1fad68d4ca 100644
--- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js
+++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js
@@ -79,21 +79,21 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Derived));
var OtherDerived = (function (_super) {
__extends(OtherDerived, _super);
function OtherDerived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return OtherDerived;
}(Base));
diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js
index 1d8efafc234..dc08f25c912 100644
--- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js
+++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js
@@ -69,21 +69,21 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Derived));
var OtherDerived = (function (_super) {
__extends(OtherDerived, _super);
function OtherDerived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return OtherDerived;
}(Base));
diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js
index f6436b7d3e2..e755e3cacc3 100644
--- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js
+++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js
@@ -72,21 +72,21 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Derived));
var OtherDerived = (function (_super) {
__extends(OtherDerived, _super);
function OtherDerived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return OtherDerived;
}(Base));
diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js
index 27ed085a009..323c9a4c6d8 100644
--- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js
+++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js
@@ -38,14 +38,14 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Base));
diff --git a/tests/baselines/reference/constructorHasPrototypeProperty.js b/tests/baselines/reference/constructorHasPrototypeProperty.js
index dae4e0bab23..64fa9d9099d 100644
--- a/tests/baselines/reference/constructorHasPrototypeProperty.js
+++ b/tests/baselines/reference/constructorHasPrototypeProperty.js
@@ -52,7 +52,7 @@ var NonGeneric;
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(C));
@@ -71,7 +71,7 @@ var Generic;
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(C));
diff --git a/tests/baselines/reference/constructorOverloads3.js b/tests/baselines/reference/constructorOverloads3.js
index 8ba67658a08..94b29ad89ab 100644
--- a/tests/baselines/reference/constructorOverloads3.js
+++ b/tests/baselines/reference/constructorOverloads3.js
@@ -36,7 +36,7 @@ var __extends = (this && this.__extends) || (function () {
var Foo = (function (_super) {
__extends(Foo, _super);
function Foo(x, y) {
- var _this;
+ var _this = this;
return _this;
}
Foo.prototype.bar1 = function () { };
diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js
index 3193d69ed3c..afdfa36e4a6 100644
--- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js
+++ b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js
@@ -530,7 +530,7 @@ method2();
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
B.prototype.method2 = function () {
return this.method1(2);
diff --git a/tests/baselines/reference/contextualTypingArrayOfLambdas.js b/tests/baselines/reference/contextualTypingArrayOfLambdas.js
index 4fda0eca214..5d8b40e39f0 100644
--- a/tests/baselines/reference/contextualTypingArrayOfLambdas.js
+++ b/tests/baselines/reference/contextualTypingArrayOfLambdas.js
@@ -33,14 +33,14 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(A));
diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression.js b/tests/baselines/reference/contextualTypingOfConditionalExpression.js
index 6e6ea60691c..fd5ec50ebb4 100644
--- a/tests/baselines/reference/contextualTypingOfConditionalExpression.js
+++ b/tests/baselines/reference/contextualTypingOfConditionalExpression.js
@@ -34,14 +34,14 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(A));
diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js
index 0678ff5bf74..f5063fa003a 100644
--- a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js
+++ b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js
@@ -31,14 +31,14 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(A));
diff --git a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js
index b71997f21fe..725409c2c7f 100644
--- a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js
+++ b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js
@@ -30,7 +30,7 @@ var C = (function () {
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(C));
diff --git a/tests/baselines/reference/declFileClassExtendsNull.js b/tests/baselines/reference/declFileClassExtendsNull.js
index d46ff63f62a..a7ea02011fe 100644
--- a/tests/baselines/reference/declFileClassExtendsNull.js
+++ b/tests/baselines/reference/declFileClassExtendsNull.js
@@ -17,7 +17,6 @@ var __extends = (this && this.__extends) || (function () {
var ExtendsNull = (function (_super) {
__extends(ExtendsNull, _super);
function ExtendsNull() {
- return _super.apply(this, arguments) || this;
}
return ExtendsNull;
}(null));
diff --git a/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js b/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js
index 3d90e148d42..9bdd0fc09a7 100644
--- a/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js
+++ b/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js
@@ -28,7 +28,7 @@ var X = (function () {
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(X));
diff --git a/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js b/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js
index c2d7a1faf33..58d7bb774f1 100644
--- a/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js
+++ b/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js
@@ -31,7 +31,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
diff --git a/tests/baselines/reference/declFileGenericType.js b/tests/baselines/reference/declFileGenericType.js
index 8d7f16745c0..c17463a6d15 100644
--- a/tests/baselines/reference/declFileGenericType.js
+++ b/tests/baselines/reference/declFileGenericType.js
@@ -96,7 +96,7 @@ exports.g = C.F5();
var h = (function (_super) {
__extends(h, _super);
function h() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return h;
}(C.A));
diff --git a/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js b/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js
index da5177c89df..da1ebb2a8f3 100644
--- a/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js
+++ b/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js
@@ -40,7 +40,7 @@ var X;
var W = (function (_super) {
__extends(W, _super);
function W() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return W;
}(A.B.Base.W));
@@ -58,7 +58,7 @@ var X;
var W = (function (_super) {
__extends(W, _super);
function W() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return W;
}(X.Y.base.W));
diff --git a/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js b/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js
index a396c81c27f..d369da3902b 100644
--- a/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js
+++ b/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js
@@ -49,7 +49,7 @@ var A;
var ContextMenu = (function (_super) {
__extends(ContextMenu, _super);
function ContextMenu() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return ContextMenu;
}(B.EventManager));
diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends.js b/tests/baselines/reference/declarationEmitExpressionInExtends.js
index 7a0fe6ed603..884897a9cf6 100644
--- a/tests/baselines/reference/declarationEmitExpressionInExtends.js
+++ b/tests/baselines/reference/declarationEmitExpressionInExtends.js
@@ -34,7 +34,7 @@ var Q = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(x));
diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends2.js b/tests/baselines/reference/declarationEmitExpressionInExtends2.js
index 1df6168f09b..86c79dda8a8 100644
--- a/tests/baselines/reference/declarationEmitExpressionInExtends2.js
+++ b/tests/baselines/reference/declarationEmitExpressionInExtends2.js
@@ -34,7 +34,7 @@ function getClass(c) {
var MyClass = (function (_super) {
__extends(MyClass, _super);
function MyClass() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return MyClass;
}(getClass(2)));
diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends3.js b/tests/baselines/reference/declarationEmitExpressionInExtends3.js
index 2a291f273dc..960a7af6780 100644
--- a/tests/baselines/reference/declarationEmitExpressionInExtends3.js
+++ b/tests/baselines/reference/declarationEmitExpressionInExtends3.js
@@ -75,7 +75,7 @@ function getExportedClass(c) {
var MyClass = (function (_super) {
__extends(MyClass, _super);
function MyClass() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return MyClass;
}(getLocalClass(undefined)));
@@ -83,7 +83,7 @@ exports.MyClass = MyClass;
var MyClass2 = (function (_super) {
__extends(MyClass2, _super);
function MyClass2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return MyClass2;
}(getExportedClass(undefined)));
@@ -91,7 +91,7 @@ exports.MyClass2 = MyClass2;
var MyClass3 = (function (_super) {
__extends(MyClass3, _super);
function MyClass3() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return MyClass3;
}(getExportedClass(undefined)));
@@ -99,7 +99,7 @@ exports.MyClass3 = MyClass3;
var MyClass4 = (function (_super) {
__extends(MyClass4, _super);
function MyClass4() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return MyClass4;
}(getExportedClass(undefined)));
diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends4.js b/tests/baselines/reference/declarationEmitExpressionInExtends4.js
index 9502f871476..d6c33023c12 100644
--- a/tests/baselines/reference/declarationEmitExpressionInExtends4.js
+++ b/tests/baselines/reference/declarationEmitExpressionInExtends4.js
@@ -38,21 +38,21 @@ function getSomething() {
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(getSomething()));
var C2 = (function (_super) {
__extends(C2, _super);
function C2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
}(SomeUndefinedFunction()));
var C3 = (function (_super) {
__extends(C3, _super);
function C3() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C3;
}(SomeUndefinedFunction));
diff --git a/tests/baselines/reference/declarationEmitNameConflicts3.js b/tests/baselines/reference/declarationEmitNameConflicts3.js
index e4c81906681..f093ff5b3b2 100644
--- a/tests/baselines/reference/declarationEmitNameConflicts3.js
+++ b/tests/baselines/reference/declarationEmitNameConflicts3.js
@@ -68,7 +68,7 @@ var M;
var E = (function (_super) {
__extends(E, _super);
function E() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return E;
}(C));
diff --git a/tests/baselines/reference/declarationEmitProtectedMembers.js b/tests/baselines/reference/declarationEmitProtectedMembers.js
index 3d919912803..7b3b42e7c97 100644
--- a/tests/baselines/reference/declarationEmitProtectedMembers.js
+++ b/tests/baselines/reference/declarationEmitProtectedMembers.js
@@ -93,7 +93,7 @@ var C1 = (function () {
var C2 = (function (_super) {
__extends(C2, _super);
function C2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
C2.prototype.f = function () {
return _super.prototype.f.call(this) + this.x;
@@ -107,7 +107,7 @@ var C2 = (function (_super) {
var C3 = (function (_super) {
__extends(C3, _super);
function C3() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
C3.prototype.f = function () {
return _super.prototype.f.call(this);
diff --git a/tests/baselines/reference/declarationEmitThisPredicates01.js b/tests/baselines/reference/declarationEmitThisPredicates01.js
index 22656ecbda5..04c49422c5c 100644
--- a/tests/baselines/reference/declarationEmitThisPredicates01.js
+++ b/tests/baselines/reference/declarationEmitThisPredicates01.js
@@ -33,7 +33,7 @@ exports.C = C;
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(C));
diff --git a/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName01.js b/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName01.js
index c3d5754963e..79156f795ea 100644
--- a/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName01.js
+++ b/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName01.js
@@ -33,7 +33,7 @@ exports.C = C;
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(C));
diff --git a/tests/baselines/reference/declareDottedExtend.js b/tests/baselines/reference/declareDottedExtend.js
index b0913b1f3e5..1256602ee1e 100644
--- a/tests/baselines/reference/declareDottedExtend.js
+++ b/tests/baselines/reference/declareDottedExtend.js
@@ -26,14 +26,14 @@ var ab = A.B;
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(ab.C));
var E = (function (_super) {
__extends(E, _super);
function E() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return E;
}(A.B.C));
diff --git a/tests/baselines/reference/decoratorOnClassConstructor4.js b/tests/baselines/reference/decoratorOnClassConstructor4.js
index a9b30440f6b..75286943417 100644
--- a/tests/baselines/reference/decoratorOnClassConstructor4.js
+++ b/tests/baselines/reference/decoratorOnClassConstructor4.js
@@ -54,7 +54,7 @@ B = __decorate([
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(A));
diff --git a/tests/baselines/reference/decoratorOnClassMethod12.js b/tests/baselines/reference/decoratorOnClassMethod12.js
index e5b5747ee2b..c9ff30307f0 100644
--- a/tests/baselines/reference/decoratorOnClassMethod12.js
+++ b/tests/baselines/reference/decoratorOnClassMethod12.js
@@ -37,7 +37,7 @@ var M;
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
C.prototype.method = function () { };
return C;
diff --git a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js
index 51cca070d1f..960fea90a0c 100644
--- a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js
+++ b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js
@@ -52,7 +52,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- var _this;
+ var _this = this;
return _this;
}
return Derived;
@@ -65,7 +65,7 @@ var Base2 = (function () {
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- var _this;
+ var _this = this;
var r2 = function () { return _this = _super.call(this) || this; }; // error for misplaced super call (nested function)
return _this;
}
@@ -74,7 +74,7 @@ var Derived2 = (function (_super) {
var Derived3 = (function (_super) {
__extends(Derived3, _super);
function Derived3() {
- var _this;
+ var _this = this;
var r = function () { _this = _super.call(this) || this; }; // error
return _this;
}
@@ -83,7 +83,7 @@ var Derived3 = (function (_super) {
var Derived4 = (function (_super) {
__extends(Derived4, _super);
function Derived4() {
- var _this;
+ var _this = this;
var r = _this = _super.call(this) || this; // ok
return _this;
}
diff --git a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js
index 35dd1e197e2..23a4233d124 100644
--- a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js
+++ b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js
@@ -43,7 +43,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Derived.prototype.x = function () {
return 1;
diff --git a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js
index 03310fcfc4c..8d2010b3346 100644
--- a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js
+++ b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js
@@ -73,7 +73,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
@@ -94,7 +94,7 @@ var Base2 = (function () {
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Base2));
diff --git a/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js b/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js
index 36ad6580c18..fceefd905cc 100644
--- a/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js
+++ b/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js
@@ -37,7 +37,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
@@ -50,7 +50,7 @@ var Base2 = (function () {
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Base2));
diff --git a/tests/baselines/reference/derivedClassOverridesPrivates.js b/tests/baselines/reference/derivedClassOverridesPrivates.js
index c14783c8337..642453857c5 100644
--- a/tests/baselines/reference/derivedClassOverridesPrivates.js
+++ b/tests/baselines/reference/derivedClassOverridesPrivates.js
@@ -34,7 +34,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
@@ -46,7 +46,7 @@ var Base2 = (function () {
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Base2));
diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js
index dc9059f956e..6eef011e0f4 100644
--- a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js
+++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js
@@ -136,7 +136,7 @@ var Base2 = (function () {
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Base2));
diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js
index 8e90218b063..594e8166e5e 100644
--- a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js
+++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js
@@ -35,14 +35,14 @@ var Base = (function () {
var Derived1 = (function (_super) {
__extends(Derived1, _super);
function Derived1() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived1;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Derived1));
diff --git a/tests/baselines/reference/derivedClassOverridesPublicMembers.js b/tests/baselines/reference/derivedClassOverridesPublicMembers.js
index 3bbd661c704..af9a013a3d8 100644
--- a/tests/baselines/reference/derivedClassOverridesPublicMembers.js
+++ b/tests/baselines/reference/derivedClassOverridesPublicMembers.js
@@ -134,7 +134,7 @@ var Base2 = (function () {
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Base2));
diff --git a/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js b/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js
index b53c736b857..fa7eb924653 100644
--- a/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js
+++ b/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js
@@ -42,7 +42,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
@@ -54,7 +54,7 @@ var Base2 = (function () {
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Base2));
diff --git a/tests/baselines/reference/derivedClassParameterProperties.js b/tests/baselines/reference/derivedClassParameterProperties.js
index c127b1993ef..d8d93e35078 100644
--- a/tests/baselines/reference/derivedClassParameterProperties.js
+++ b/tests/baselines/reference/derivedClassParameterProperties.js
@@ -114,7 +114,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived(y) {
- var _this;
+ var _this = this;
var a = 1;
_this = _super.call(this) || this; // ok
return _this;
@@ -124,7 +124,7 @@ var Derived = (function (_super) {
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2(y) {
- var _this;
+ var _this = this;
_this.y = y;
var a = 1;
_this = _super.call(this) || this; // error
@@ -145,7 +145,7 @@ var Derived3 = (function (_super) {
var Derived4 = (function (_super) {
__extends(Derived4, _super);
function Derived4(y) {
- var _this;
+ var _this = this;
_this.a = 1;
var b = 2;
_this = _super.call(this) || this; // error
@@ -166,7 +166,7 @@ var Derived5 = (function (_super) {
var Derived6 = (function (_super) {
__extends(Derived6, _super);
function Derived6(y) {
- var _this;
+ var _this = this;
_this.a = 1;
var b = 2;
_this = _super.call(this) || this; // error: "super" has to be called before "this" accessing
@@ -177,7 +177,7 @@ var Derived6 = (function (_super) {
var Derived7 = (function (_super) {
__extends(Derived7, _super);
function Derived7(y) {
- var _this;
+ var _this = this;
_this.a = 1;
_this.a = 3;
_this.b = 3;
@@ -206,7 +206,7 @@ var Base2 = (function () {
var Derived9 = (function (_super) {
__extends(Derived9, _super);
function Derived9(y) {
- var _this;
+ var _this = this;
_this.a = 1;
_this.a = 3;
_this.b = 3;
diff --git a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js
index 92ef489cd4c..8703215a631 100644
--- a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js
+++ b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js
@@ -51,7 +51,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- var _this = _super.apply(this, arguments) || this;
+ var _this = _super !== null && _super.apply(this, arguments) || this;
_this.a = _this = _super.call(this) || this;
return _this;
}
diff --git a/tests/baselines/reference/derivedClassTransitivity.js b/tests/baselines/reference/derivedClassTransitivity.js
index 2809d899351..83a750c707d 100644
--- a/tests/baselines/reference/derivedClassTransitivity.js
+++ b/tests/baselines/reference/derivedClassTransitivity.js
@@ -41,7 +41,7 @@ var C = (function () {
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
D.prototype.foo = function () { }; // ok to drop parameters
return D;
@@ -49,7 +49,7 @@ var D = (function (_super) {
var E = (function (_super) {
__extends(E, _super);
function E() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
E.prototype.foo = function (x) { }; // ok to add optional parameters
return E;
diff --git a/tests/baselines/reference/derivedClassTransitivity2.js b/tests/baselines/reference/derivedClassTransitivity2.js
index 8b69ea00102..7cd7d73d604 100644
--- a/tests/baselines/reference/derivedClassTransitivity2.js
+++ b/tests/baselines/reference/derivedClassTransitivity2.js
@@ -41,7 +41,7 @@ var C = (function () {
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
D.prototype.foo = function (x) { }; // ok to drop parameters
return D;
@@ -49,7 +49,7 @@ var D = (function (_super) {
var E = (function (_super) {
__extends(E, _super);
function E() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
E.prototype.foo = function (x, y) { }; // ok to add optional parameters
return E;
diff --git a/tests/baselines/reference/derivedClassTransitivity3.js b/tests/baselines/reference/derivedClassTransitivity3.js
index 98e4bdd4b43..35a080f1800 100644
--- a/tests/baselines/reference/derivedClassTransitivity3.js
+++ b/tests/baselines/reference/derivedClassTransitivity3.js
@@ -41,7 +41,7 @@ var C = (function () {
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
D.prototype.foo = function (x) { }; // ok to drop parameters
return D;
@@ -49,7 +49,7 @@ var D = (function (_super) {
var E = (function (_super) {
__extends(E, _super);
function E() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
E.prototype.foo = function (x, y) { }; // ok to add optional parameters
return E;
diff --git a/tests/baselines/reference/derivedClassTransitivity4.js b/tests/baselines/reference/derivedClassTransitivity4.js
index 315d0322ed2..e0f82d55a7c 100644
--- a/tests/baselines/reference/derivedClassTransitivity4.js
+++ b/tests/baselines/reference/derivedClassTransitivity4.js
@@ -41,7 +41,7 @@ var C = (function () {
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
D.prototype.foo = function () { }; // ok to drop parameters
return D;
@@ -49,7 +49,7 @@ var D = (function (_super) {
var E = (function (_super) {
__extends(E, _super);
function E() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
E.prototype.foo = function (x) { }; // ok to add optional parameters
return E;
diff --git a/tests/baselines/reference/derivedClassWithAny.js b/tests/baselines/reference/derivedClassWithAny.js
index dd89a166cc1..c8ed8ce5cad 100644
--- a/tests/baselines/reference/derivedClassWithAny.js
+++ b/tests/baselines/reference/derivedClassWithAny.js
@@ -96,7 +96,7 @@ var C = (function () {
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(D.prototype, "X", {
get: function () {
@@ -124,7 +124,7 @@ var D = (function (_super) {
var E = (function (_super) {
__extends(E, _super);
function E() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(E.prototype, "X", {
get: function () { return ''; },
diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js
index c38b9b3bd00..07cc9c43539 100644
--- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js
+++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js
@@ -51,7 +51,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Derived.prototype.fn = function () {
return '';
diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js
index a50008d4142..36c6cb56563 100644
--- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js
+++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js
@@ -61,7 +61,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Derived.prototype.fn = function () {
return '';
diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js
index 1680b9178ff..52a50a8aa77 100644
--- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js
+++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js
@@ -50,7 +50,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Derived.fn = function () {
return '';
diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js
index 2b65181cea9..6e39028ce34 100644
--- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js
+++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js
@@ -63,7 +63,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Derived.fn = function () {
return '';
diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js
index ca746223e1b..1fd02f5ba62 100644
--- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js
+++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js
@@ -46,7 +46,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- var _this = _super.apply(this, arguments) || this;
+ var _this = _super !== null && _super.apply(this, arguments) || this;
_this.x = 1;
_this.y = 'hello';
return _this;
@@ -64,7 +64,7 @@ var Base2 = (function () {
var D = (function (_super) {
__extends(D, _super);
function D() {
- var _this = _super.apply(this, arguments) || this;
+ var _this = _super !== null && _super.apply(this, arguments) || this;
_this.x = 2;
_this.y = null;
return _this;
diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js
index 492682b67bc..178ca2be16d 100644
--- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js
+++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js
@@ -54,7 +54,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- var _this = _super.apply(this, arguments) || this;
+ var _this = _super !== null && _super.apply(this, arguments) || this;
_this.x = 1;
_this.y = 'hello';
return _this;
@@ -74,7 +74,7 @@ var Base2 = (function () {
var D = (function (_super) {
__extends(D, _super);
function D() {
- var _this = _super.apply(this, arguments) || this;
+ var _this = _super !== null && _super.apply(this, arguments) || this;
_this.x = 2;
_this.y = null;
return _this;
diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js
index cf4d5cadecc..86f69433504 100644
--- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js
+++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js
@@ -78,7 +78,7 @@ var Derived = (function (_super) {
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- var _this = _super.apply(this, arguments) || this;
+ var _this = _super !== null && _super.apply(this, arguments) || this;
_this.x = 1;
_this.y = 'hello';
return _this;
@@ -107,7 +107,7 @@ var D = (function (_super) {
var D2 = (function (_super) {
__extends(D2, _super);
function D2() {
- var _this = _super.apply(this, arguments) || this;
+ var _this = _super !== null && _super.apply(this, arguments) || this;
_this.x = 2;
_this.y = null;
return _this;
diff --git a/tests/baselines/reference/derivedClasses.js b/tests/baselines/reference/derivedClasses.js
index 3bb1f7793ef..b23161d00d2 100644
--- a/tests/baselines/reference/derivedClasses.js
+++ b/tests/baselines/reference/derivedClasses.js
@@ -44,7 +44,7 @@ var __extends = (this && this.__extends) || (function () {
var Red = (function (_super) {
__extends(Red, _super);
function Red() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Red.prototype.shade = function () {
var _this = this;
@@ -63,7 +63,7 @@ var Color = (function () {
var Blue = (function (_super) {
__extends(Blue, _super);
function Blue() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Blue.prototype.shade = function () {
var _this = this;
diff --git a/tests/baselines/reference/derivedGenericClassWithAny.js b/tests/baselines/reference/derivedGenericClassWithAny.js
index bab2879b229..0cf4c316a44 100644
--- a/tests/baselines/reference/derivedGenericClassWithAny.js
+++ b/tests/baselines/reference/derivedGenericClassWithAny.js
@@ -69,7 +69,7 @@ var C = (function () {
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(D.prototype, "X", {
get: function () {
@@ -97,7 +97,7 @@ var D = (function (_super) {
var E = (function (_super) {
__extends(E, _super);
function E() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(E.prototype, "X", {
get: function () { return ''; } // error
diff --git a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js
index 9d076ad63a7..a190b26901c 100644
--- a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js
+++ b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js
@@ -39,7 +39,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Derived.prototype.foo = function (x) {
return null;
diff --git a/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js b/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js
index faa148c65a5..26f4408e41e 100644
--- a/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js
+++ b/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js
@@ -44,7 +44,7 @@ var Derived = (function () {
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Base));
diff --git a/tests/baselines/reference/emitThisInSuperMethodCall.js b/tests/baselines/reference/emitThisInSuperMethodCall.js
index 16712fb82cf..2d800d562c2 100644
--- a/tests/baselines/reference/emitThisInSuperMethodCall.js
+++ b/tests/baselines/reference/emitThisInSuperMethodCall.js
@@ -48,7 +48,7 @@ var User = (function () {
var RegisteredUser = (function (_super) {
__extends(RegisteredUser, _super);
function RegisteredUser() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
RegisteredUser.prototype.f = function () {
(function () {
diff --git a/tests/baselines/reference/emptyModuleName.js b/tests/baselines/reference/emptyModuleName.js
index 7a22f87cfb4..1d8401803a7 100644
--- a/tests/baselines/reference/emptyModuleName.js
+++ b/tests/baselines/reference/emptyModuleName.js
@@ -19,7 +19,7 @@ var A = require("");
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
diff --git a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js
index c5403b4d685..27f05f3f8ea 100644
--- a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js
+++ b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js
@@ -35,7 +35,7 @@ var base = (function () {
var derived = (function (_super) {
__extends(derived, _super);
function derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return derived;
}(base));
diff --git a/tests/baselines/reference/errorSuperCalls.js b/tests/baselines/reference/errorSuperCalls.js
index 17a96d335f3..ebe9de27f42 100644
--- a/tests/baselines/reference/errorSuperCalls.js
+++ b/tests/baselines/reference/errorSuperCalls.js
@@ -137,7 +137,7 @@ var Derived = (function (_super) {
__extends(Derived, _super);
//super call with type arguments
function Derived() {
- var _this;
+ var _this = this;
_super.prototype..call(_this);
_this = _super.call(this) || this;
return _this;
@@ -152,7 +152,7 @@ var OtherBase = (function () {
var OtherDerived = (function (_super) {
__extends(OtherDerived, _super);
function OtherDerived() {
- var _this = _super.apply(this, arguments) || this;
+ var _this = _super !== null && _super.apply(this, arguments) || this;
//super call in class member initializer of derived type
_this.t = _this = _super.call(this) || this;
return _this;
diff --git a/tests/baselines/reference/errorSuperPropertyAccess.js b/tests/baselines/reference/errorSuperPropertyAccess.js
index 04ce626be32..b33755e245a 100644
--- a/tests/baselines/reference/errorSuperPropertyAccess.js
+++ b/tests/baselines/reference/errorSuperPropertyAccess.js
@@ -252,7 +252,7 @@ var SomeDerived2 = (function (_super) {
var SomeDerived3 = (function (_super) {
__extends(SomeDerived3, _super);
function SomeDerived3() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
SomeDerived3.fn = function () {
_super.publicStaticMember = 3;
diff --git a/tests/baselines/reference/errorsInGenericTypeReference.js b/tests/baselines/reference/errorsInGenericTypeReference.js
index 49ddbe58dac..2e54d0cf71c 100644
--- a/tests/baselines/reference/errorsInGenericTypeReference.js
+++ b/tests/baselines/reference/errorsInGenericTypeReference.js
@@ -140,7 +140,7 @@ var testClass6 = (function () {
var testClass7 = (function (_super) {
__extends(testClass7, _super);
function testClass7() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return testClass7;
}(Foo)); // error: could not find symbol V
diff --git a/tests/baselines/reference/es6ClassSuperCodegenBug.js b/tests/baselines/reference/es6ClassSuperCodegenBug.js
index c909a68ccf7..1945726d218 100644
--- a/tests/baselines/reference/es6ClassSuperCodegenBug.js
+++ b/tests/baselines/reference/es6ClassSuperCodegenBug.js
@@ -33,7 +33,7 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- var _this;
+ var _this = this;
if (true) {
_this = _super.call(this, 'a1', 'b1') || this;
}
diff --git a/tests/baselines/reference/es6ClassTest2.js b/tests/baselines/reference/es6ClassTest2.js
index 5133757348b..e86d04bccd0 100644
--- a/tests/baselines/reference/es6ClassTest2.js
+++ b/tests/baselines/reference/es6ClassTest2.js
@@ -319,7 +319,7 @@ var BaseClassWithConstructor = (function () {
var ChildClassWithoutConstructor = (function (_super) {
__extends(ChildClassWithoutConstructor, _super);
function ChildClassWithoutConstructor() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return ChildClassWithoutConstructor;
}(BaseClassWithConstructor));
diff --git a/tests/baselines/reference/es6ClassTest7.js b/tests/baselines/reference/es6ClassTest7.js
index 48937285684..8251d5ec476 100644
--- a/tests/baselines/reference/es6ClassTest7.js
+++ b/tests/baselines/reference/es6ClassTest7.js
@@ -22,7 +22,7 @@ var __extends = (this && this.__extends) || (function () {
var Bar = (function (_super) {
__extends(Bar, _super);
function Bar() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Bar;
}(M.Foo));
diff --git a/tests/baselines/reference/exportAssignmentOfGenericType1.js b/tests/baselines/reference/exportAssignmentOfGenericType1.js
index f9ffa44e82c..bab7c815f19 100644
--- a/tests/baselines/reference/exportAssignmentOfGenericType1.js
+++ b/tests/baselines/reference/exportAssignmentOfGenericType1.js
@@ -39,7 +39,7 @@ define(["require", "exports", "exportAssignmentOfGenericType1_0"], function (req
var M = (function (_super) {
__extends(M, _super);
function M() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return M;
}(q));
diff --git a/tests/baselines/reference/exportDeclarationInInternalModule.js b/tests/baselines/reference/exportDeclarationInInternalModule.js
index c1827d0df9e..dde865bd2c7 100644
--- a/tests/baselines/reference/exportDeclarationInInternalModule.js
+++ b/tests/baselines/reference/exportDeclarationInInternalModule.js
@@ -37,7 +37,7 @@ var Bbb = (function () {
var Aaa = (function (_super) {
__extends(Aaa, _super);
function Aaa() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Aaa;
}(Bbb));
diff --git a/tests/baselines/reference/extBaseClass1.js b/tests/baselines/reference/extBaseClass1.js
index 3424f39bd16..6cf7b42962e 100644
--- a/tests/baselines/reference/extBaseClass1.js
+++ b/tests/baselines/reference/extBaseClass1.js
@@ -42,7 +42,7 @@ var M;
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(B));
@@ -52,7 +52,7 @@ var M;
var C2 = (function (_super) {
__extends(C2, _super);
function C2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
}(M.B));
@@ -63,7 +63,7 @@ var N;
var C3 = (function (_super) {
__extends(C3, _super);
function C3() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C3;
}(M.B));
diff --git a/tests/baselines/reference/extBaseClass2.js b/tests/baselines/reference/extBaseClass2.js
index ffc3249d7bf..7ef8adec3df 100644
--- a/tests/baselines/reference/extBaseClass2.js
+++ b/tests/baselines/reference/extBaseClass2.js
@@ -26,7 +26,7 @@ var N;
var C4 = (function (_super) {
__extends(C4, _super);
function C4() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C4;
}(M.B));
@@ -37,7 +37,7 @@ var M;
var C5 = (function (_super) {
__extends(C5, _super);
function C5() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C5;
}(B));
diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType.js b/tests/baselines/reference/extendAndImplementTheSameBaseType.js
index ed5232d88c9..d2942220bf1 100644
--- a/tests/baselines/reference/extendAndImplementTheSameBaseType.js
+++ b/tests/baselines/reference/extendAndImplementTheSameBaseType.js
@@ -33,7 +33,7 @@ var C = (function () {
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
D.prototype.baz = function () { };
return D;
diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js
index e9f37d718ff..40b3425966e 100644
--- a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js
+++ b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js
@@ -38,7 +38,7 @@ var C = (function () {
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
D.prototype.baz = function () { };
return D;
diff --git a/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js b/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js
index 3a755b0e6f6..28c9ef2f22e 100644
--- a/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js
+++ b/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js
@@ -17,7 +17,7 @@ var __extends = (this && this.__extends) || (function () {
var derived = (function (_super) {
__extends(derived, _super);
function derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return derived;
}(base));
diff --git a/tests/baselines/reference/extendClassExpressionFromModule.js b/tests/baselines/reference/extendClassExpressionFromModule.js
index 6e6943d5766..7353c6970e8 100644
--- a/tests/baselines/reference/extendClassExpressionFromModule.js
+++ b/tests/baselines/reference/extendClassExpressionFromModule.js
@@ -36,7 +36,7 @@ var x = foo1;
var y = (function (_super) {
__extends(y, _super);
function y() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return y;
}(x));
diff --git a/tests/baselines/reference/extendConstructSignatureInInterface.js b/tests/baselines/reference/extendConstructSignatureInInterface.js
index 30c1151c332..3067fdc706e 100644
--- a/tests/baselines/reference/extendConstructSignatureInInterface.js
+++ b/tests/baselines/reference/extendConstructSignatureInInterface.js
@@ -25,7 +25,7 @@ var CStatic;
var E = (function (_super) {
__extends(E, _super);
function E() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return E;
}(CStatic));
diff --git a/tests/baselines/reference/extendNonClassSymbol1.js b/tests/baselines/reference/extendNonClassSymbol1.js
index 066d19560b6..b4e59aa9711 100644
--- a/tests/baselines/reference/extendNonClassSymbol1.js
+++ b/tests/baselines/reference/extendNonClassSymbol1.js
@@ -24,7 +24,7 @@ var x = A;
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(x)); // error, could not find symbol xs
diff --git a/tests/baselines/reference/extendNonClassSymbol2.js b/tests/baselines/reference/extendNonClassSymbol2.js
index b82c3e2233b..f029193175f 100644
--- a/tests/baselines/reference/extendNonClassSymbol2.js
+++ b/tests/baselines/reference/extendNonClassSymbol2.js
@@ -23,7 +23,7 @@ var x = new Foo(); // legal, considered a constructor function
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(Foo)); // error, could not find symbol Foo
diff --git a/tests/baselines/reference/extendPrivateConstructorClass.js b/tests/baselines/reference/extendPrivateConstructorClass.js
index 21968a3c47b..12540d9cd38 100644
--- a/tests/baselines/reference/extendPrivateConstructorClass.js
+++ b/tests/baselines/reference/extendPrivateConstructorClass.js
@@ -23,7 +23,7 @@ var __extends = (this && this.__extends) || (function () {
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(abc.XYZ));
diff --git a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js
index b689e9b2640..2d1add18ae0 100644
--- a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js
+++ b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js
@@ -56,7 +56,7 @@ var Backbone = require("./extendingClassFromAliasAndUsageInIndexer_backbone");
var VisualizationModel = (function (_super) {
__extends(VisualizationModel, _super);
function VisualizationModel() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return VisualizationModel;
}(Backbone.Model));
@@ -77,7 +77,7 @@ var Backbone = require("./extendingClassFromAliasAndUsageInIndexer_backbone");
var VisualizationModel = (function (_super) {
__extends(VisualizationModel, _super);
function VisualizationModel() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return VisualizationModel;
}(Backbone.Model));
diff --git a/tests/baselines/reference/extendsClauseAlreadySeen.js b/tests/baselines/reference/extendsClauseAlreadySeen.js
index ec727e6b757..f6e43d5ddc6 100644
--- a/tests/baselines/reference/extendsClauseAlreadySeen.js
+++ b/tests/baselines/reference/extendsClauseAlreadySeen.js
@@ -25,7 +25,7 @@ var C = (function () {
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
D.prototype.baz = function () { };
return D;
diff --git a/tests/baselines/reference/extendsClauseAlreadySeen2.js b/tests/baselines/reference/extendsClauseAlreadySeen2.js
index 7b960bb97eb..99bccf44479 100644
--- a/tests/baselines/reference/extendsClauseAlreadySeen2.js
+++ b/tests/baselines/reference/extendsClauseAlreadySeen2.js
@@ -25,7 +25,7 @@ var C = (function () {
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
D.prototype.baz = function () { };
return D;
diff --git a/tests/baselines/reference/fluentClasses.js b/tests/baselines/reference/fluentClasses.js
index ae117674a81..f9c8181aa49 100644
--- a/tests/baselines/reference/fluentClasses.js
+++ b/tests/baselines/reference/fluentClasses.js
@@ -40,7 +40,7 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
B.prototype.bar = function () {
return this;
@@ -50,7 +50,7 @@ var B = (function (_super) {
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
C.prototype.baz = function () {
return this;
diff --git a/tests/baselines/reference/for-inStatements.js b/tests/baselines/reference/for-inStatements.js
index 44e7cf24bf4..18ccb37b416 100644
--- a/tests/baselines/reference/for-inStatements.js
+++ b/tests/baselines/reference/for-inStatements.js
@@ -131,7 +131,7 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
B.prototype.boz = function () {
for (var x in this.biz()) { }
diff --git a/tests/baselines/reference/for-inStatementsInvalid.js b/tests/baselines/reference/for-inStatementsInvalid.js
index 437e3fb9aef..d70da450f08 100644
--- a/tests/baselines/reference/for-inStatementsInvalid.js
+++ b/tests/baselines/reference/for-inStatementsInvalid.js
@@ -112,7 +112,7 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
B.prototype.boz = function () {
for (var x in this.biz()) { }
diff --git a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js
index ea3bee7b12b..27284f8b272 100644
--- a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js
+++ b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js
@@ -73,7 +73,7 @@ var C = (function () {
var C2 = (function (_super) {
__extends(C2, _super);
function C2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
}(C));
diff --git a/tests/baselines/reference/functionImplementationErrors.js b/tests/baselines/reference/functionImplementationErrors.js
index 4a641451815..e227693b386 100644
--- a/tests/baselines/reference/functionImplementationErrors.js
+++ b/tests/baselines/reference/functionImplementationErrors.js
@@ -139,14 +139,14 @@ var AnotherClass = (function () {
var Derived1 = (function (_super) {
__extends(Derived1, _super);
function Derived1() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived1;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Base));
diff --git a/tests/baselines/reference/functionImplementations.js b/tests/baselines/reference/functionImplementations.js
index 26468d8af80..994ff36da56 100644
--- a/tests/baselines/reference/functionImplementations.js
+++ b/tests/baselines/reference/functionImplementations.js
@@ -241,7 +241,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
@@ -292,7 +292,7 @@ function f6() {
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Base));
diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs.js b/tests/baselines/reference/functionSubtypingOfVarArgs.js
index 83b889fa22b..a4b43c3a1a1 100644
--- a/tests/baselines/reference/functionSubtypingOfVarArgs.js
+++ b/tests/baselines/reference/functionSubtypingOfVarArgs.js
@@ -37,7 +37,7 @@ var EventBase = (function () {
var StringEvent = (function (_super) {
__extends(StringEvent, _super);
function StringEvent() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
StringEvent.prototype.add = function (listener) {
_super.prototype.add.call(this, listener);
diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs2.js b/tests/baselines/reference/functionSubtypingOfVarArgs2.js
index bc49c602acb..829440c12d4 100644
--- a/tests/baselines/reference/functionSubtypingOfVarArgs2.js
+++ b/tests/baselines/reference/functionSubtypingOfVarArgs2.js
@@ -37,7 +37,7 @@ var EventBase = (function () {
var StringEvent = (function (_super) {
__extends(StringEvent, _super);
function StringEvent() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
StringEvent.prototype.add = function (listener) {
_super.prototype.add.call(this, listener);
diff --git a/tests/baselines/reference/generatedContextualTyping.js b/tests/baselines/reference/generatedContextualTyping.js
index 782f3e985a1..f8dc2863470 100644
--- a/tests/baselines/reference/generatedContextualTyping.js
+++ b/tests/baselines/reference/generatedContextualTyping.js
@@ -374,14 +374,14 @@ var Base = (function () {
var Derived1 = (function (_super) {
__extends(Derived1, _super);
function Derived1() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived1;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Base));
diff --git a/tests/baselines/reference/genericBaseClassLiteralProperty.js b/tests/baselines/reference/genericBaseClassLiteralProperty.js
index 35c31bb6677..0c3a5ee6129 100644
--- a/tests/baselines/reference/genericBaseClassLiteralProperty.js
+++ b/tests/baselines/reference/genericBaseClassLiteralProperty.js
@@ -31,7 +31,7 @@ var BaseClass = (function () {
var SubClass = (function (_super) {
__extends(SubClass, _super);
function SubClass() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
SubClass.prototype.Error = function () {
var x = this._getValue1();
diff --git a/tests/baselines/reference/genericBaseClassLiteralProperty2.js b/tests/baselines/reference/genericBaseClassLiteralProperty2.js
index 8e91f9e228d..e2ef30f9ce8 100644
--- a/tests/baselines/reference/genericBaseClassLiteralProperty2.js
+++ b/tests/baselines/reference/genericBaseClassLiteralProperty2.js
@@ -40,7 +40,7 @@ var BaseCollection2 = (function () {
var DataView2 = (function (_super) {
__extends(DataView2, _super);
function DataView2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
DataView2.prototype.fillItems = function (item) {
this._itemsByKey['dummy'] = item;
diff --git a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js
index d7564d3e052..3ccdb5b6b55 100644
--- a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js
+++ b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js
@@ -127,14 +127,14 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Derived));
diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js
index 28c0fbcec7e..c5de24019b2 100644
--- a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js
+++ b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js
@@ -51,14 +51,14 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Base));
diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js
index 32e7bc1e74c..a4f8172a312 100644
--- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js
+++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js
@@ -59,7 +59,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js
index f54727317e5..074b25fdeea 100644
--- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js
+++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js
@@ -57,14 +57,14 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Base));
diff --git a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js
index cba1152fb02..b7b9e35a543 100644
--- a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js
+++ b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js
@@ -51,7 +51,7 @@ var M;
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(C1));
diff --git a/tests/baselines/reference/genericClassExpressionInFunction.js b/tests/baselines/reference/genericClassExpressionInFunction.js
index 41252322414..e1a47ffaac7 100644
--- a/tests/baselines/reference/genericClassExpressionInFunction.js
+++ b/tests/baselines/reference/genericClassExpressionInFunction.js
@@ -52,7 +52,7 @@ function B1() {
return (function (_super) {
__extends(class_1, _super);
function class_1() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return class_1;
}(A));
@@ -62,7 +62,7 @@ var B2 = (function () {
this.anon = (function (_super) {
__extends(class_2, _super);
function class_2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return class_2;
}(A));
@@ -73,7 +73,7 @@ function B3() {
return (function (_super) {
__extends(Inner, _super);
function Inner() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Inner;
}(A));
@@ -82,14 +82,14 @@ function B3() {
var K = (function (_super) {
__extends(K, _super);
function K() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return K;
}(B1()));
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}((new B2().anon)));
@@ -97,7 +97,7 @@ var b3Number = B3();
var S = (function (_super) {
__extends(S, _super);
function S() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return S;
}(b3Number));
diff --git a/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js b/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js
index d91a43805e3..c8a5b3ac0c4 100644
--- a/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js
+++ b/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js
@@ -19,14 +19,14 @@ var __extends = (this && this.__extends) || (function () {
var A = (function (_super) {
__extends(A, _super);
function A() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return A;
}(B));
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(C));
diff --git a/tests/baselines/reference/genericClassStaticMethod.js b/tests/baselines/reference/genericClassStaticMethod.js
index ea236e40203..803950f58df 100644
--- a/tests/baselines/reference/genericClassStaticMethod.js
+++ b/tests/baselines/reference/genericClassStaticMethod.js
@@ -31,7 +31,7 @@ var Foo = (function () {
var Bar = (function (_super) {
__extends(Bar, _super);
function Bar() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Bar.getFoo = function () {
};
diff --git a/tests/baselines/reference/genericClasses3.js b/tests/baselines/reference/genericClasses3.js
index 94c22c1241f..95eb5db106a 100644
--- a/tests/baselines/reference/genericClasses3.js
+++ b/tests/baselines/reference/genericClasses3.js
@@ -36,7 +36,7 @@ var B = (function () {
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(B));
diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js
index 1e231a172c3..cd028bb28b2 100644
--- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js
+++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js
@@ -31,7 +31,7 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js
index 2438206cbf2..694bc87c453 100644
--- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js
+++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js
@@ -31,7 +31,7 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
diff --git a/tests/baselines/reference/genericInheritedDefaultConstructors.js b/tests/baselines/reference/genericInheritedDefaultConstructors.js
index 6d4112fb666..15848c10874 100644
--- a/tests/baselines/reference/genericInheritedDefaultConstructors.js
+++ b/tests/baselines/reference/genericInheritedDefaultConstructors.js
@@ -29,7 +29,7 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
diff --git a/tests/baselines/reference/genericPrototypeProperty2.js b/tests/baselines/reference/genericPrototypeProperty2.js
index dd494b1bdcd..66f058090dc 100644
--- a/tests/baselines/reference/genericPrototypeProperty2.js
+++ b/tests/baselines/reference/genericPrototypeProperty2.js
@@ -34,7 +34,7 @@ var BaseEvent = (function () {
var MyEvent = (function (_super) {
__extends(MyEvent, _super);
function MyEvent() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return MyEvent;
}(BaseEvent));
@@ -46,7 +46,7 @@ var BaseEventWrapper = (function () {
var MyEventWrapper = (function (_super) {
__extends(MyEventWrapper, _super);
function MyEventWrapper() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return MyEventWrapper;
}(BaseEventWrapper));
diff --git a/tests/baselines/reference/genericPrototypeProperty3.js b/tests/baselines/reference/genericPrototypeProperty3.js
index 45e39d173a1..1fef7a9b407 100644
--- a/tests/baselines/reference/genericPrototypeProperty3.js
+++ b/tests/baselines/reference/genericPrototypeProperty3.js
@@ -33,7 +33,7 @@ var BaseEvent = (function () {
var MyEvent = (function (_super) {
__extends(MyEvent, _super);
function MyEvent() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return MyEvent;
}(BaseEvent));
@@ -45,7 +45,7 @@ var BaseEventWrapper = (function () {
var MyEventWrapper = (function (_super) {
__extends(MyEventWrapper, _super);
function MyEventWrapper() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return MyEventWrapper;
}(BaseEventWrapper));
diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js
index 558f6034b16..22886334aad 100644
--- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js
+++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js
@@ -62,7 +62,7 @@ var TypeScript2;
var PullTypeSymbol = (function (_super) {
__extends(PullTypeSymbol, _super);
function PullTypeSymbol() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return PullTypeSymbol;
}(PullSymbol));
diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js
index bea6d81dbaa..d0bf08113d2 100644
--- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js
+++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js
@@ -63,7 +63,7 @@ var TypeScript;
var PullTypeSymbol = (function (_super) {
__extends(PullTypeSymbol, _super);
function PullTypeSymbol() {
- var _this = _super.apply(this, arguments) || this;
+ var _this = _super !== null && _super.apply(this, arguments) || this;
_this._elementType = null;
return _this;
}
diff --git a/tests/baselines/reference/genericTypeAssertions2.js b/tests/baselines/reference/genericTypeAssertions2.js
index bcdaaa3958b..160967e83de 100644
--- a/tests/baselines/reference/genericTypeAssertions2.js
+++ b/tests/baselines/reference/genericTypeAssertions2.js
@@ -33,7 +33,7 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
B.prototype.bar = function () {
return null;
diff --git a/tests/baselines/reference/genericTypeAssertions4.js b/tests/baselines/reference/genericTypeAssertions4.js
index a2a7548bb63..991db3822ac 100644
--- a/tests/baselines/reference/genericTypeAssertions4.js
+++ b/tests/baselines/reference/genericTypeAssertions4.js
@@ -45,7 +45,7 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
B.prototype.bar = function () { return 1; };
return B;
@@ -53,7 +53,7 @@ var B = (function (_super) {
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
C.prototype.baz = function () { return 1; };
return C;
diff --git a/tests/baselines/reference/genericTypeAssertions6.js b/tests/baselines/reference/genericTypeAssertions6.js
index cdeb709fdfb..069e567ab10 100644
--- a/tests/baselines/reference/genericTypeAssertions6.js
+++ b/tests/baselines/reference/genericTypeAssertions6.js
@@ -49,7 +49,7 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
B.prototype.g = function (x) {
var a = x;
diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js
index 8704103d530..8fc00dcc08f 100644
--- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js
+++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js
@@ -65,7 +65,7 @@ var g = function f(x) { var y; return y; };
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(C));
@@ -81,7 +81,7 @@ var M;
var D2 = (function (_super) {
__extends(D2, _super);
function D2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D2;
}(M.E));
diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js
index 75317fe0c81..9730afdee04 100644
--- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js
+++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js
@@ -60,14 +60,14 @@ var g = function f(x) { var y; return y; };
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(I));
var D2 = (function (_super) {
__extends(D2, _super);
function D2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D2;
}(M.C));
diff --git a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js
index f91d9b5d6cf..5498d3d1fad 100644
--- a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js
+++ b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js
@@ -36,7 +36,7 @@ define(["require", "exports"], function (require, exports) {
var List = (function (_super) {
__extends(List, _super);
function List() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
List.prototype.Bar = function () { };
return List;
@@ -51,7 +51,7 @@ define(["require", "exports"], function (require, exports) {
var ListItem = (function (_super) {
__extends(ListItem, _super);
function ListItem() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return ListItem;
}(CollectionItem));
diff --git a/tests/baselines/reference/heterogeneousArrayLiterals.js b/tests/baselines/reference/heterogeneousArrayLiterals.js
index e15125ed70e..f65fac6fb5d 100644
--- a/tests/baselines/reference/heterogeneousArrayLiterals.js
+++ b/tests/baselines/reference/heterogeneousArrayLiterals.js
@@ -165,14 +165,14 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
var Derived2 = (function (_super) {
__extends(Derived2, _super);
function Derived2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived2;
}(Base));
diff --git a/tests/baselines/reference/ifDoWhileStatements.js b/tests/baselines/reference/ifDoWhileStatements.js
index 83e40177434..22dd78a9687 100644
--- a/tests/baselines/reference/ifDoWhileStatements.js
+++ b/tests/baselines/reference/ifDoWhileStatements.js
@@ -182,7 +182,7 @@ var C = (function () {
var C2 = (function (_super) {
__extends(C2, _super);
function C2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
}(C));
diff --git a/tests/baselines/reference/illegalSuperCallsInConstructor.js b/tests/baselines/reference/illegalSuperCallsInConstructor.js
index 7e138dbf4a1..bb29e857e9b 100644
--- a/tests/baselines/reference/illegalSuperCallsInConstructor.js
+++ b/tests/baselines/reference/illegalSuperCallsInConstructor.js
@@ -39,7 +39,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- var _this;
+ var _this = this;
var r2 = function () { return _this = _super.call(this) || this; };
var r3 = function () { _this = _super.call(this) || this; };
var r4 = function () { _this = _super.call(this) || this; };
diff --git a/tests/baselines/reference/implementClausePrecedingExtends.js b/tests/baselines/reference/implementClausePrecedingExtends.js
index 20a95fbcdc8..8c6c591138e 100644
--- a/tests/baselines/reference/implementClausePrecedingExtends.js
+++ b/tests/baselines/reference/implementClausePrecedingExtends.js
@@ -21,7 +21,7 @@ var C = (function () {
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(C));
diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js
index 07819ad752c..d492e7fa7e2 100644
--- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js
+++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js
@@ -104,21 +104,21 @@ var Foo = (function () {
var Bar = (function (_super) {
__extends(Bar, _super);
function Bar() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Bar;
}(Foo));
var Bar2 = (function (_super) {
__extends(Bar2, _super);
function Bar2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Bar2;
}(Foo));
var Bar3 = (function (_super) {
__extends(Bar3, _super);
function Bar3() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Bar3;
}(Foo));
@@ -133,28 +133,28 @@ var M;
var Baz = (function (_super) {
__extends(Baz, _super);
function Baz() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Baz;
}(Foo));
var Bar = (function (_super) {
__extends(Bar, _super);
function Bar() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Bar;
}(Foo));
var Bar2 = (function (_super) {
__extends(Bar2, _super);
function Bar2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Bar2;
}(Foo));
var Bar3 = (function (_super) {
__extends(Bar3, _super);
function Bar3() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Bar3;
}(Foo));
@@ -170,14 +170,14 @@ var M2;
var Baz = (function (_super) {
__extends(Baz, _super);
function Baz() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Baz;
}(Foo));
var Bar = (function (_super) {
__extends(Bar, _super);
function Bar() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Bar;
}(Foo));
@@ -188,14 +188,14 @@ var M2;
var Bar2 = (function (_super) {
__extends(Bar2, _super);
function Bar2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Bar2;
}(Foo));
var Bar3 = (function (_super) {
__extends(Bar3, _super);
function Bar3() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Bar3;
}(Foo));
diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js
index d79ae31ac25..6bffdf9d4e7 100644
--- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js
+++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js
@@ -80,28 +80,28 @@ var Bar4 = (function () {
var Bar5 = (function (_super) {
__extends(Bar5, _super);
function Bar5() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Bar5;
}(Foo));
var Bar6 = (function (_super) {
__extends(Bar6, _super);
function Bar6() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Bar6;
}(Foo));
var Bar7 = (function (_super) {
__extends(Bar7, _super);
function Bar7() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Bar7;
}(Foo));
var Bar8 = (function (_super) {
__extends(Bar8, _super);
function Bar8() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Bar8;
}(Foo));
diff --git a/tests/baselines/reference/importAsBaseClass.js b/tests/baselines/reference/importAsBaseClass.js
index 290e331b3f1..75d6e68d4c5 100644
--- a/tests/baselines/reference/importAsBaseClass.js
+++ b/tests/baselines/reference/importAsBaseClass.js
@@ -35,7 +35,7 @@ var Greeter = require("./importAsBaseClass_0");
var Hello = (function (_super) {
__extends(Hello, _super);
function Hello() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Hello;
}(Greeter));
diff --git a/tests/baselines/reference/importHelpers.js b/tests/baselines/reference/importHelpers.js
index 571bdb4fa4b..fea4ee2db27 100644
--- a/tests/baselines/reference/importHelpers.js
+++ b/tests/baselines/reference/importHelpers.js
@@ -45,7 +45,7 @@ exports.A = A;
var B = (function (_super) {
tslib_1.__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
@@ -97,7 +97,7 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
diff --git a/tests/baselines/reference/importHelpersAmd.js b/tests/baselines/reference/importHelpersAmd.js
index fea93840fa9..6054e147386 100644
--- a/tests/baselines/reference/importHelpersAmd.js
+++ b/tests/baselines/reference/importHelpersAmd.js
@@ -32,7 +32,7 @@ define(["require", "exports", "tslib", "./a"], function (require, exports, tslib
var B = (function (_super) {
tslib_1.__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(a_1.A));
diff --git a/tests/baselines/reference/importHelpersInIsolatedModules.js b/tests/baselines/reference/importHelpersInIsolatedModules.js
index 5c395ea0b9f..429a71c1ab8 100644
--- a/tests/baselines/reference/importHelpersInIsolatedModules.js
+++ b/tests/baselines/reference/importHelpersInIsolatedModules.js
@@ -45,7 +45,7 @@ exports.A = A;
var B = (function (_super) {
tslib_1.__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
@@ -77,7 +77,7 @@ var A = (function () {
var B = (function (_super) {
tslib_1.__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
diff --git a/tests/baselines/reference/importHelpersNoHelpers.js b/tests/baselines/reference/importHelpersNoHelpers.js
index 832cfeaf519..53b4b326819 100644
--- a/tests/baselines/reference/importHelpersNoHelpers.js
+++ b/tests/baselines/reference/importHelpersNoHelpers.js
@@ -44,7 +44,7 @@ exports.A = A;
var B = (function (_super) {
tslib_1.__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
@@ -99,7 +99,7 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
diff --git a/tests/baselines/reference/importHelpersNoModule.js b/tests/baselines/reference/importHelpersNoModule.js
index bd658b703f1..f84666ae198 100644
--- a/tests/baselines/reference/importHelpersNoModule.js
+++ b/tests/baselines/reference/importHelpersNoModule.js
@@ -37,7 +37,7 @@ exports.A = A;
var B = (function (_super) {
tslib_1.__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
@@ -89,7 +89,7 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
diff --git a/tests/baselines/reference/importHelpersOutFile.js b/tests/baselines/reference/importHelpersOutFile.js
index a45f6285782..572115ba4bb 100644
--- a/tests/baselines/reference/importHelpersOutFile.js
+++ b/tests/baselines/reference/importHelpersOutFile.js
@@ -35,7 +35,7 @@ define("b", ["require", "exports", "tslib", "a"], function (require, exports, ts
var B = (function (_super) {
tslib_1.__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(a_1.A));
@@ -46,7 +46,7 @@ define("c", ["require", "exports", "tslib", "a"], function (require, exports, ts
var C = (function (_super) {
tslib_2.__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(a_2.A));
diff --git a/tests/baselines/reference/importHelpersSystem.js b/tests/baselines/reference/importHelpersSystem.js
index 20f2d299c52..b7c10ee3c34 100644
--- a/tests/baselines/reference/importHelpersSystem.js
+++ b/tests/baselines/reference/importHelpersSystem.js
@@ -51,7 +51,7 @@ System.register(["tslib", "./a"], function (exports_1, context_1) {
B = (function (_super) {
tslib_1.__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(a_1.A));
diff --git a/tests/baselines/reference/importShadowsGlobalName.js b/tests/baselines/reference/importShadowsGlobalName.js
index cb3f0378328..94be0dfd5a0 100644
--- a/tests/baselines/reference/importShadowsGlobalName.js
+++ b/tests/baselines/reference/importShadowsGlobalName.js
@@ -36,7 +36,7 @@ define(["require", "exports", "Foo"], function (require, exports, Error) {
var Bar = (function (_super) {
__extends(Bar, _super);
function Bar() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Bar;
}(Error));
diff --git a/tests/baselines/reference/importUsedInExtendsList1.js b/tests/baselines/reference/importUsedInExtendsList1.js
index c19e5be7e13..4075719c9c5 100644
--- a/tests/baselines/reference/importUsedInExtendsList1.js
+++ b/tests/baselines/reference/importUsedInExtendsList1.js
@@ -36,7 +36,7 @@ var foo = require("./importUsedInExtendsList1_require");
var Sub = (function (_super) {
__extends(Sub, _super);
function Sub() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Sub;
}(foo.Super));
diff --git a/tests/baselines/reference/indexerConstraints2.js b/tests/baselines/reference/indexerConstraints2.js
index 2dfc6d69e06..4336fd2ff32 100644
--- a/tests/baselines/reference/indexerConstraints2.js
+++ b/tests/baselines/reference/indexerConstraints2.js
@@ -47,7 +47,7 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
@@ -60,7 +60,7 @@ var F = (function () {
var G = (function (_super) {
__extends(G, _super);
function G() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return G;
}(F));
@@ -73,7 +73,7 @@ var H = (function () {
var I = (function (_super) {
__extends(I, _super);
function I() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return I;
}(H));
@@ -86,7 +86,7 @@ var J = (function () {
var K = (function (_super) {
__extends(K, _super);
function K() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return K;
}(J));
diff --git a/tests/baselines/reference/indirectSelfReference.js b/tests/baselines/reference/indirectSelfReference.js
index d912f07c145..6410e463dbb 100644
--- a/tests/baselines/reference/indirectSelfReference.js
+++ b/tests/baselines/reference/indirectSelfReference.js
@@ -16,14 +16,14 @@ var __extends = (this && this.__extends) || (function () {
var a = (function (_super) {
__extends(a, _super);
function a() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return a;
}(b));
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return b;
}(a));
diff --git a/tests/baselines/reference/indirectSelfReferenceGeneric.js b/tests/baselines/reference/indirectSelfReferenceGeneric.js
index 7c362a384aa..695970159d9 100644
--- a/tests/baselines/reference/indirectSelfReferenceGeneric.js
+++ b/tests/baselines/reference/indirectSelfReferenceGeneric.js
@@ -16,14 +16,14 @@ var __extends = (this && this.__extends) || (function () {
var a = (function (_super) {
__extends(a, _super);
function a() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return a;
}(b));
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return b;
}(a));
diff --git a/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js b/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js
index 4589d2d9671..fd9bbac1623 100644
--- a/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js
+++ b/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js
@@ -48,7 +48,7 @@ var Base = (function () {
var A = (function (_super) {
__extends(A, _super);
function A() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return A;
}(Base));
diff --git a/tests/baselines/reference/inheritFromGenericTypeParameter.js b/tests/baselines/reference/inheritFromGenericTypeParameter.js
index 4e58f0b490d..f8145ec2c01 100644
--- a/tests/baselines/reference/inheritFromGenericTypeParameter.js
+++ b/tests/baselines/reference/inheritFromGenericTypeParameter.js
@@ -16,7 +16,7 @@ var __extends = (this && this.__extends) || (function () {
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(T));
diff --git a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js
index 15cdaba7d01..138e3aa5694 100644
--- a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js
+++ b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js
@@ -29,14 +29,14 @@ var B = (function () {
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(B));
var C2 = (function (_super) {
__extends(C2, _super);
function C2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
}(B));
diff --git a/tests/baselines/reference/inheritance.js b/tests/baselines/reference/inheritance.js
index 72fa6c80a81..48d96b10f9c 100644
--- a/tests/baselines/reference/inheritance.js
+++ b/tests/baselines/reference/inheritance.js
@@ -58,14 +58,14 @@ var B2 = (function () {
var D1 = (function (_super) {
__extends(D1, _super);
function D1() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D1;
}(B1));
var D2 = (function (_super) {
__extends(D2, _super);
function D2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D2;
}(B2));
@@ -77,7 +77,7 @@ var N = (function () {
var ND = (function (_super) {
__extends(ND, _super);
function ND() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return ND;
}(N));
@@ -91,7 +91,7 @@ var Good = (function () {
var Baad = (function (_super) {
__extends(Baad, _super);
function Baad() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Baad.prototype.f = function () { return 0; };
Baad.prototype.g = function (n) { return 0; };
diff --git a/tests/baselines/reference/inheritance1.js b/tests/baselines/reference/inheritance1.js
index b3d87d0452f..a00330e8556 100644
--- a/tests/baselines/reference/inheritance1.js
+++ b/tests/baselines/reference/inheritance1.js
@@ -80,7 +80,7 @@ var Control = (function () {
var Button = (function (_super) {
__extends(Button, _super);
function Button() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Button.prototype.select = function () { };
return Button;
@@ -88,7 +88,7 @@ var Button = (function (_super) {
var TextBox = (function (_super) {
__extends(TextBox, _super);
function TextBox() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
TextBox.prototype.select = function () { };
return TextBox;
@@ -96,14 +96,14 @@ var TextBox = (function (_super) {
var ImageBase = (function (_super) {
__extends(ImageBase, _super);
function ImageBase() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return ImageBase;
}(Control));
var Image1 = (function (_super) {
__extends(Image1, _super);
function Image1() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Image1;
}(Control));
diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js
index 5c1568663dc..52ab48573fd 100644
--- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js
+++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js
@@ -30,14 +30,14 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
C.prototype.myMethod = function () { };
return C;
diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js
index f35305b2bcc..c64a0e4259c 100644
--- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js
+++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js
@@ -30,14 +30,14 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
C.prototype.myMethod = function () { };
return C;
diff --git a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js
index 8a6de50ee60..9ac0fe18592 100644
--- a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js
+++ b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js
@@ -30,14 +30,14 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
C.prototype.myMethod = function () { };
return C;
diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js
index be1cecd939d..fae79488dce 100644
--- a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js
+++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js
@@ -45,7 +45,7 @@ var a = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(b.prototype, "x", {
get: function () {
diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js
index 76829925c62..3fc6417afaf 100644
--- a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js
+++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js
@@ -36,7 +36,7 @@ var a = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(b.prototype, "x", {
get: function () {
diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js
index fff0dd7b832..1d0a8f09a40 100644
--- a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js
+++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js
@@ -31,7 +31,7 @@ var a = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(b.prototype, "x", {
get: function () {
diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js
index 085b3966541..93b72b73c8b 100644
--- a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js
+++ b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js
@@ -42,7 +42,7 @@ var a = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
b.prototype.x = function () {
return "20";
diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js b/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js
index fc405638f0f..0f189aa50cc 100644
--- a/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js
+++ b/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js
@@ -33,7 +33,7 @@ var a = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
b.prototype.x = function () {
return "20";
diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js
index 94ea69a7fba..996138a53d9 100644
--- a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js
+++ b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js
@@ -28,7 +28,7 @@ var a = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
b.prototype.x = function () {
return "20";
diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js
index 866323cd204..97b856980ea 100644
--- a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js
+++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js
@@ -42,7 +42,7 @@ var a = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return b;
}(a));
diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js
index fe8c0457240..c7c6c84f9d0 100644
--- a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js
+++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js
@@ -31,7 +31,7 @@ var a = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return b;
}(a));
diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js
index e431d295d01..c8e9c5ef9d4 100644
--- a/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js
+++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js
@@ -26,7 +26,7 @@ var a = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return b;
}(a));
diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js
index 1e1a7c69a08..62355930d92 100644
--- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js
+++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js
@@ -26,7 +26,7 @@ var A = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js
index 01370a3183c..12c5eac07e9 100644
--- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js
+++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js
@@ -45,7 +45,7 @@ var N;
var D1 = (function (_super) {
__extends(D1, _super);
function D1() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D1;
}(M.C1));
@@ -53,7 +53,7 @@ var N;
var D2 = (function (_super) {
__extends(D2, _super);
function D2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D2;
}(M.C2));
diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js
index bff113f80e3..4af25e03d13 100644
--- a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js
+++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js
@@ -45,7 +45,7 @@ var a = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(b, "x", {
get: function () {
diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js
index 773f97c2bc9..904868fecd9 100644
--- a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js
+++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js
@@ -36,7 +36,7 @@ var a = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(b, "x", {
get: function () {
diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js
index 73eb1021d62..cf6e23685f1 100644
--- a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js
+++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js
@@ -31,7 +31,7 @@ var a = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(b, "x", {
get: function () {
diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js
index 8d2aab0bbd1..91946af7478 100644
--- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js
+++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js
@@ -42,7 +42,7 @@ var a = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
b.x = function () {
return "20";
diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js
index c41281eecc4..9b7e0dd925c 100644
--- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js
+++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js
@@ -37,7 +37,7 @@ var a = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
b.x = function () {
return "20";
diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js b/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js
index cdbc3913a22..7e50c2c0318 100644
--- a/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js
+++ b/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js
@@ -33,7 +33,7 @@ var a = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
b.x = function () {
return "20";
diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js
index 77a8e21dc74..fab0f4fb579 100644
--- a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js
+++ b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js
@@ -28,7 +28,7 @@ var a = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
b.x = function () {
return "20";
diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js b/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js
index 0f0eb43fdd6..b973095e5b8 100644
--- a/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js
+++ b/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js
@@ -28,7 +28,7 @@ var a = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
b.x = function () {
return "20";
diff --git a/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js b/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js
index fd92a887219..017adeea3c7 100644
--- a/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js
+++ b/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js
@@ -28,7 +28,7 @@ var a = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
b.x = function () {
return new b().x;
diff --git a/tests/baselines/reference/inheritanceStaticMembersCompatible.js b/tests/baselines/reference/inheritanceStaticMembersCompatible.js
index 7a74aea52d6..96416e977fa 100644
--- a/tests/baselines/reference/inheritanceStaticMembersCompatible.js
+++ b/tests/baselines/reference/inheritanceStaticMembersCompatible.js
@@ -26,7 +26,7 @@ var a = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return b;
}(a));
diff --git a/tests/baselines/reference/inheritanceStaticMembersIncompatible.js b/tests/baselines/reference/inheritanceStaticMembersIncompatible.js
index f1805811345..15f3298f2cc 100644
--- a/tests/baselines/reference/inheritanceStaticMembersIncompatible.js
+++ b/tests/baselines/reference/inheritanceStaticMembersIncompatible.js
@@ -26,7 +26,7 @@ var a = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return b;
}(a));
diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js
index 435bf6d0a8d..79d2e88b646 100644
--- a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js
+++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js
@@ -41,7 +41,7 @@ var a = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return b;
}(a));
diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js
index ee69b89dd4c..1ec8e5f5f65 100644
--- a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js
+++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js
@@ -31,7 +31,7 @@ var a = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return b;
}(a));
diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js
index 7fd7cca98c4..6c83789d51d 100644
--- a/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js
+++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js
@@ -26,7 +26,7 @@ var a = (function () {
var b = (function (_super) {
__extends(b, _super);
function b() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return b;
}(a));
diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams.js b/tests/baselines/reference/inheritedConstructorWithRestParams.js
index a11136ba6b7..5e7e3736885 100644
--- a/tests/baselines/reference/inheritedConstructorWithRestParams.js
+++ b/tests/baselines/reference/inheritedConstructorWithRestParams.js
@@ -37,7 +37,7 @@ var Base = (function () {
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams2.js b/tests/baselines/reference/inheritedConstructorWithRestParams2.js
index 7d06886f562..c27b723b562 100644
--- a/tests/baselines/reference/inheritedConstructorWithRestParams2.js
+++ b/tests/baselines/reference/inheritedConstructorWithRestParams2.js
@@ -58,14 +58,14 @@ var BaseBase2 = (function () {
var Base = (function (_super) {
__extends(Base, _super);
function Base() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Base;
}(BaseBase));
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
diff --git a/tests/baselines/reference/inheritedModuleMembersForClodule.js b/tests/baselines/reference/inheritedModuleMembersForClodule.js
index 3a20f4313b6..be7aec77731 100644
--- a/tests/baselines/reference/inheritedModuleMembersForClodule.js
+++ b/tests/baselines/reference/inheritedModuleMembersForClodule.js
@@ -43,7 +43,7 @@ var C = (function () {
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(C));
@@ -57,7 +57,7 @@ var D = (function (_super) {
var E = (function (_super) {
__extends(E, _super);
function E() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
E.bar = function () {
return this.foo();
diff --git a/tests/baselines/reference/instanceOfAssignability.js b/tests/baselines/reference/instanceOfAssignability.js
index a0b15b0e287..db5554596af 100644
--- a/tests/baselines/reference/instanceOfAssignability.js
+++ b/tests/baselines/reference/instanceOfAssignability.js
@@ -120,14 +120,14 @@ var Animal = (function () {
var Mammal = (function (_super) {
__extends(Mammal, _super);
function Mammal() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Mammal;
}(Animal));
var Giraffe = (function (_super) {
__extends(Giraffe, _super);
function Giraffe() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Giraffe;
}(Mammal));
diff --git a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js
index b80c8f0ff13..44c781c8c98 100644
--- a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js
+++ b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js
@@ -74,7 +74,7 @@ var NonGeneric;
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(C));
@@ -106,7 +106,7 @@ var Generic;
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(C));
diff --git a/tests/baselines/reference/instanceSubtypeCheck2.js b/tests/baselines/reference/instanceSubtypeCheck2.js
index c42f071ddb9..0a02162d707 100644
--- a/tests/baselines/reference/instanceSubtypeCheck2.js
+++ b/tests/baselines/reference/instanceSubtypeCheck2.js
@@ -26,7 +26,7 @@ var C1 = (function () {
var C2 = (function (_super) {
__extends(C2, _super);
function C2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
}(C1));
diff --git a/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js b/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js
index 32c15674984..b7d2ec46914 100644
--- a/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js
+++ b/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js
@@ -133,7 +133,7 @@ var A = (function () {
var A1 = (function (_super) {
__extends(A1, _super);
function A1() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return A1;
}(A));
@@ -145,7 +145,7 @@ var A2 = (function () {
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(A));
diff --git a/tests/baselines/reference/instantiatedReturnTypeContravariance.js b/tests/baselines/reference/instantiatedReturnTypeContravariance.js
index 7eed6d7f5fc..52f96561f20 100644
--- a/tests/baselines/reference/instantiatedReturnTypeContravariance.js
+++ b/tests/baselines/reference/instantiatedReturnTypeContravariance.js
@@ -52,7 +52,7 @@ var c = (function () {
var d = (function (_super) {
__extends(d, _super);
function d() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
d.prototype.foo = function () {
return null;
diff --git a/tests/baselines/reference/interfaceClassMerging.js b/tests/baselines/reference/interfaceClassMerging.js
index 4cca8c1c8b9..e2167776f22 100644
--- a/tests/baselines/reference/interfaceClassMerging.js
+++ b/tests/baselines/reference/interfaceClassMerging.js
@@ -62,7 +62,7 @@ var Foo = (function () {
var Bar = (function (_super) {
__extends(Bar, _super);
function Bar() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Bar.prototype.method = function (a) {
return this.optionalProperty;
diff --git a/tests/baselines/reference/interfaceClassMerging2.js b/tests/baselines/reference/interfaceClassMerging2.js
index 8d860ae95e7..4c879ba4cab 100644
--- a/tests/baselines/reference/interfaceClassMerging2.js
+++ b/tests/baselines/reference/interfaceClassMerging2.js
@@ -58,7 +58,7 @@ var Foo = (function () {
var Bar = (function (_super) {
__extends(Bar, _super);
function Bar() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Bar.prototype.classBarMethod = function () {
return this;
diff --git a/tests/baselines/reference/interfaceExtendsClass1.js b/tests/baselines/reference/interfaceExtendsClass1.js
index fc5afcdddac..69560e82557 100644
--- a/tests/baselines/reference/interfaceExtendsClass1.js
+++ b/tests/baselines/reference/interfaceExtendsClass1.js
@@ -37,7 +37,7 @@ var Control = (function () {
var Button = (function (_super) {
__extends(Button, _super);
function Button() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
Button.prototype.select = function () { };
return Button;
@@ -45,7 +45,7 @@ var Button = (function (_super) {
var TextBox = (function (_super) {
__extends(TextBox, _super);
function TextBox() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
TextBox.prototype.select = function () { };
return TextBox;
@@ -53,7 +53,7 @@ var TextBox = (function (_super) {
var Image = (function (_super) {
__extends(Image, _super);
function Image() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Image;
}(Control));
diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js
index 334ac5cd292..12d1539bb3d 100644
--- a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js
+++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js
@@ -48,7 +48,7 @@ var C = (function () {
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
D.prototype.foo = function (x) { return x; };
D.prototype.other = function (x) { return x; };
diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js
index cc3e8163d18..cec3eed8497 100644
--- a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js
+++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js
@@ -44,7 +44,7 @@ var C = (function () {
var D = (function (_super) {
__extends(D, _super);
function D() {
- var _this = _super.apply(this, arguments) || this;
+ var _this = _super !== null && _super.apply(this, arguments) || this;
_this.x = 2;
_this.y = 3;
return _this;
@@ -57,7 +57,7 @@ var D = (function (_super) {
var D2 = (function (_super) {
__extends(D2, _super);
function D2() {
- var _this = _super.apply(this, arguments) || this;
+ var _this = _super !== null && _super.apply(this, arguments) || this;
_this.x = "";
return _this;
}
diff --git a/tests/baselines/reference/interfaceImplementation8.js b/tests/baselines/reference/interfaceImplementation8.js
index aa9bf7b4cf8..c966cdc2c14 100644
--- a/tests/baselines/reference/interfaceImplementation8.js
+++ b/tests/baselines/reference/interfaceImplementation8.js
@@ -69,21 +69,21 @@ var C3 = (function () {
var C4 = (function (_super) {
__extends(C4, _super);
function C4() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C4;
}(C1));
var C5 = (function (_super) {
__extends(C5, _super);
function C5() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C5;
}(C2));
var C6 = (function (_super) {
__extends(C6, _super);
function C6() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C6;
}(C3));
@@ -95,7 +95,7 @@ var C7 = (function () {
var C8 = (function (_super) {
__extends(C8, _super);
function C8() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C8;
}(C7));
diff --git a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js
index 897fa17c4e5..2ca72edf3c1 100644
--- a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js
+++ b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js
@@ -100,7 +100,7 @@ var Y;
var BB = (function (_super) {
__extends(BB, _super);
function BB() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return BB;
}(A));
@@ -115,7 +115,7 @@ var Y2;
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(AA));
@@ -149,7 +149,7 @@ var YY;
var BB = (function (_super) {
__extends(BB, _super);
function BB() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return BB;
}(A));
@@ -164,7 +164,7 @@ var YY2;
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(AA));
@@ -198,7 +198,7 @@ var YYY;
var BB = (function (_super) {
__extends(BB, _super);
function BB() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return BB;
}(A));
@@ -213,7 +213,7 @@ var YYY2;
var B = (function (_super) {
__extends(B, _super);
function B() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return B;
}(AA));
diff --git a/tests/baselines/reference/invalidMultipleVariableDeclarations.js b/tests/baselines/reference/invalidMultipleVariableDeclarations.js
index 466d7eb9049..7e1616cfca4 100644
--- a/tests/baselines/reference/invalidMultipleVariableDeclarations.js
+++ b/tests/baselines/reference/invalidMultipleVariableDeclarations.js
@@ -72,7 +72,7 @@ var C = (function () {
var C2 = (function (_super) {
__extends(C2, _super);
function C2() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C2;
}(C));
diff --git a/tests/baselines/reference/invalidReturnStatements.js b/tests/baselines/reference/invalidReturnStatements.js
index a61d036d9ed..af20c18c853 100644
--- a/tests/baselines/reference/invalidReturnStatements.js
+++ b/tests/baselines/reference/invalidReturnStatements.js
@@ -46,7 +46,7 @@ var C = (function () {
var D = (function (_super) {
__extends(D, _super);
function D() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return D;
}(C));
diff --git a/tests/baselines/reference/isolatedModulesImportExportElision.js b/tests/baselines/reference/isolatedModulesImportExportElision.js
index 7c295a315f9..80f47941e60 100644
--- a/tests/baselines/reference/isolatedModulesImportExportElision.js
+++ b/tests/baselines/reference/isolatedModulesImportExportElision.js
@@ -31,7 +31,7 @@ var ns = require("module");
var C = (function (_super) {
__extends(C, _super);
function C() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return C;
}(module_2.c2.C));
diff --git a/tests/baselines/reference/jsxInExtendsClause.js b/tests/baselines/reference/jsxInExtendsClause.js
index aa1c611783a..779b2d4cf8a 100644
--- a/tests/baselines/reference/jsxInExtendsClause.js
+++ b/tests/baselines/reference/jsxInExtendsClause.js
@@ -25,13 +25,13 @@ var __extends = (this && this.__extends) || (function () {
var Foo = (function (_super) {
__extends(Foo, _super);
function Foo() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
return Foo;
}(createComponentClass(function () { return (function (_super) {
__extends(class_1, _super);
function class_1() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
class_1.prototype.render = function () {
return React.createElement("span", null, "Hello, world!");
diff --git a/tests/baselines/reference/jsxViaImport.2.js b/tests/baselines/reference/jsxViaImport.2.js
index 635754599b1..7310da92e92 100644
--- a/tests/baselines/reference/jsxViaImport.2.js
+++ b/tests/baselines/reference/jsxViaImport.2.js
@@ -40,7 +40,7 @@ var BaseComponent_1 = require("BaseComponent");
var TestComponent = (function (_super) {
__extends(TestComponent, _super);
function TestComponent() {
- return _super.apply(this, arguments) || this;
+ return _super !== null && _super.apply(this, arguments) || this;
}
TestComponent.prototype.render = function () {
return