This fixes an issue with the use of super method calls in class private methods. See https://github.com/babel/babel/issues/9580 for more info re: behavior of the bug.
26 lines
471 B
JavaScript
26 lines
471 B
JavaScript
class Base {
|
|
superMethod() {
|
|
return 1017;
|
|
}
|
|
|
|
}
|
|
|
|
class Sub extends Base {
|
|
constructor(...args) {
|
|
super(...args);
|
|
|
|
_privateMethod.add(this);
|
|
}
|
|
|
|
publicMethod() {
|
|
return babelHelpers.classPrivateMethodGet(this, _privateMethod, _privateMethod2).call(this);
|
|
}
|
|
|
|
}
|
|
|
|
var _privateMethod = new WeakSet();
|
|
|
|
var _privateMethod2 = function _privateMethod2() {
|
|
return babelHelpers.get(babelHelpers.getPrototypeOf(this), "superMethod", this).call(this);
|
|
};
|