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

22 lines
293 B
JavaScript

class Base {
superMethod() {
return 'good';
}
}
class Sub extends Base {
superMethod() {
return 'bad';
}
#privateMethod() {
return super.superMethod();
}
publicMethod() {
return this.#privateMethod();
}
}
expect((new Sub()).publicMethod()).toEqual('good');