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

31 lines
561 B
JavaScript

class Base {
superMethod() {
return 'good';
}
}
class Sub extends Base {
constructor(...args) {
super(...args);
Object.defineProperty(this, _privateMethod, {
value: _privateMethod2
});
}
superMethod() {
return 'bad';
}
publicMethod() {
return babelHelpers.classPrivateFieldLooseBase(this, _privateMethod)[_privateMethod]();
}
}
var _privateMethod = babelHelpers.classPrivateFieldLooseKey("privateMethod");
var _privateMethod2 = function _privateMethod2() {
return Base.prototype.superMethod.call(this);
};