Tim McClure e068281e28 Fix super Method Calls in Class Private Methods (#9704)
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.
2019-03-19 18:43:02 +01:00

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);
};