Mattias Buelens 3c11a4a930 Fix super method call in private instance method calling overridden method (#9801)
* Fix super method call in private instance method calling overridden method

* Change return value in test fixtures

* Update tests to verify that overridden method is not called
2019-03-31 18:50:29 -04:00

30 lines
523 B
JavaScript

class Base {
superMethod() {
return 'good';
}
}
class Sub extends Base {
constructor(...args) {
super(...args);
_privateMethod.add(this);
}
superMethod() {
return 'bad';
}
publicMethod() {
return babelHelpers.classPrivateMethodGet(this, _privateMethod, _privateMethod2).call(this);
}
}
var _privateMethod = new WeakSet();
var _privateMethod2 = function _privateMethod2() {
return babelHelpers.get(babelHelpers.getPrototypeOf(Sub.prototype), "superMethod", this).call(this);
};