diff --git a/tests/baselines/reference/abstractClass1.js b/tests/baselines/reference/abstractClass1.js index 494673d6ce0..06868a485f5 100644 --- a/tests/baselines/reference/abstractClass1.js +++ b/tests/baselines/reference/abstractClass1.js @@ -40,8 +40,7 @@ new Copy(); var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var Foo = (function () { function Foo(f) { diff --git a/tests/baselines/reference/classAbstractInheritance.js b/tests/baselines/reference/classAbstractInheritance.js index 2aa156500e0..6656e4687d2 100644 --- a/tests/baselines/reference/classAbstractInheritance.js +++ b/tests/baselines/reference/classAbstractInheritance.js @@ -25,8 +25,7 @@ abstract class GG extends CC {} var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var A = (function () { function A() { diff --git a/tests/baselines/reference/classAbstractSuperCalls.js b/tests/baselines/reference/classAbstractSuperCalls.js index 7841785ac05..152fd03f463 100644 --- a/tests/baselines/reference/classAbstractSuperCalls.js +++ b/tests/baselines/reference/classAbstractSuperCalls.js @@ -31,8 +31,7 @@ abstract class BB extends AA { var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var A = (function () { function A() { diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethod.js b/tests/baselines/reference/classAbstractUsingAbstractMethod.js index 26a406aa008..74bc80b2630 100644 --- a/tests/baselines/reference/classAbstractUsingAbstractMethod.js +++ b/tests/baselines/reference/classAbstractUsingAbstractMethod.js @@ -21,8 +21,7 @@ a.foo(); var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var A = (function () { function A() { diff --git a/tests/baselines/reference/classInstantiatingAbstractClass.js b/tests/baselines/reference/classInstantiatingAbstractClass.js index 5a23d3d9b40..6a2c3f31e37 100644 --- a/tests/baselines/reference/classInstantiatingAbstractClass.js +++ b/tests/baselines/reference/classInstantiatingAbstractClass.js @@ -31,8 +31,7 @@ var aa = new myA; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var A = (function () { function A() { diff --git a/tests/baselines/reference/classWithAbstractMethods.js b/tests/baselines/reference/classWithAbstractMethods.js index 2035ba20ea9..91ccc5f9306 100644 --- a/tests/baselines/reference/classWithAbstractMethods.js +++ b/tests/baselines/reference/classWithAbstractMethods.js @@ -31,8 +31,7 @@ class DD extends AA { var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var A = (function () { function A() {