Zen cba64f9a09
Correctly access shadowed class binding in super.* (#12544)
* rename own binding inside methods if it collides with class ref. fix #11994

* fix name collisions in constructor

* do fix name collisions in constructor

* move logic in ReplaceSupers

* fix tests of helper-create-class-features-plugin

* remove replaceSupers in pushConstructor

* use environmentVisitor

* skip classLike nodes

* fix super ref in computed key
2021-01-12 02:31:06 +01:00

43 lines
852 B
JavaScript

var Base = /*#__PURE__*/function () {
"use strict";
function Base() {
babelHelpers.classCallCheck(this, Base);
}
babelHelpers.createClass(Base, [{
key: "method",
value: function method() {}
}]);
return Base;
}();
var Foo = /*#__PURE__*/function (_Base) {
"use strict";
babelHelpers.inherits(Foo, _Base);
var _super = babelHelpers.createSuper(Foo);
function Foo() {
var _thisSuper, _this;
babelHelpers.classCallCheck(this, Foo);
_this = _super.call(this);
if (true) {
var _Foo2;
babelHelpers.get((_thisSuper = babelHelpers.assertThisInitialized(_this), babelHelpers.getPrototypeOf(Foo.prototype)), "method", _thisSuper).call(_thisSuper);
}
return _this;
}
babelHelpers.createClass(Foo, [{
key: "method",
value: function method() {}
}]);
return Foo;
}(Base);