rewrite this in shadowed functions inside native derived class constructors - fixes #1340

This commit is contained in:
Sebastian McKenzie
2015-04-24 11:20:29 +01:00
parent 74f04ed6a1
commit a36c1b4a92
3 changed files with 45 additions and 0 deletions

View File

@@ -8,3 +8,10 @@ class Bar extends Array {
this.foo = "bar";
}
}
class Baz extends Array {
constructor() {
super();
(() => this)
}
}

View File

@@ -33,3 +33,21 @@ var Bar = (function (_Array2) {
babelHelpers.inherits(Bar, _Array2);
return Bar;
})(Array);
var Baz = (function (_Array3) {
function Baz() {
babelHelpers.classCallCheck(this, Baz);
var _this3 = new _Array3();
_this3.__proto__ = Baz.prototype;
(function () {
return _this3;
});
return _this3;
}
babelHelpers.inherits(Baz, _Array3);
return Baz;
})(Array);