Skip to content

Commit 5b9a1b5

Browse files
committed
Accepting new baselines after master merge
1 parent 26fd879 commit 5b9a1b5

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

tests/baselines/reference/classExtendingBuiltinType.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ class C10 extends Array<number> { }
1515
var __extends = (this && this.__extends) || function (d, b) {
1616
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
1717
function __() { this.constructor = d; }
18-
__.prototype = b.prototype;
19-
d.prototype = new __();
18+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2019
};
2120
var C1 = (function (_super) {
2221
__extends(C1, _super);

tests/baselines/reference/classExtendingClassLikeType.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ class D5 extends getBadBase() {
6262
var __extends = (this && this.__extends) || function (d, b) {
6363
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
6464
function __() { this.constructor = d; }
65-
__.prototype = b.prototype;
66-
d.prototype = new __();
65+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
6766
};
6867
// Error, no Base constructor function
6968
var D0 = (function (_super) {

tests/baselines/reference/classExtendingNonConstructor.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ class C7 extends foo { }
1818
var __extends = (this && this.__extends) || function (d, b) {
1919
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
2020
function __() { this.constructor = d; }
21-
__.prototype = b.prototype;
22-
d.prototype = new __();
21+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2322
};
2423
var x;
2524
function foo() {

tests/baselines/reference/classExtendingNull.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ class C2 extends (null) { }
77
var __extends = (this && this.__extends) || function (d, b) {
88
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
99
function __() { this.constructor = d; }
10-
__.prototype = b.prototype;
11-
d.prototype = new __();
10+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1211
};
1312
var C1 = (function (_super) {
1413
__extends(C1, _super);

0 commit comments

Comments
 (0)