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

67 lines
1.4 KiB
JavaScript

var Foo = /*#__PURE__*/function () {
"use strict";
function Foo() {
babelHelpers.classCallCheck(this, Foo);
}
babelHelpers.createClass(Foo, [{
key: "method",
value: function method(_Foo) {
return babelHelpers.get(babelHelpers.getPrototypeOf(Foo.prototype), "method", this).call(this, _Foo);
}
}]);
return Foo;
}();
var Bar = /*#__PURE__*/function () {
"use strict";
function Bar() {
babelHelpers.classCallCheck(this, Bar);
}
babelHelpers.createClass(Bar, [{
key: "method",
value: function method() {
return () => {
var _Bar;
return babelHelpers.get(babelHelpers.getPrototypeOf(Bar.prototype), "method", this).call(this, _Bar);
};
}
}]);
return Bar;
}();
var Baz = /*#__PURE__*/function () {
"use strict";
function Baz() {
babelHelpers.classCallCheck(this, Baz);
}
babelHelpers.createClass(Baz, [{
key: "method",
value: function method() {
var _Baz = /*#__PURE__*/function () {
function _Baz() {
babelHelpers.classCallCheck(this, _Baz);
}
babelHelpers.createClass(_Baz, [{
key: "f",
value: function f() {
var Baz = 1;
return Baz;
}
}]);
return _Baz;
}();
return babelHelpers.get(babelHelpers.getPrototypeOf(Baz.prototype), "method", this).call(this, _Baz);
}
}]);
return Baz;
}();