mirror of
https://github.com/hanzoai/babel.git
synced 2026-10-30 14:46:06 +00:00
* add test cases * fix: memoise class binding when lowering static elements and private methods * update test fixtures * update test fixtures
23 lines
626 B
JavaScript
23 lines
626 B
JavaScript
var _class;
|
|
class Base {
|
|
static basePublicStaticMethod() {
|
|
return 'good';
|
|
}
|
|
}
|
|
var _subStaticPrivateMethod = /*#__PURE__*/Symbol("subStaticPrivateMethod");
|
|
class Sub extends Base {
|
|
static basePublicStaticMethod() {
|
|
return 'bad';
|
|
}
|
|
static check() {
|
|
babelHelpers.classPrivateFieldLooseBase(Sub, _subStaticPrivateMethod)[_subStaticPrivateMethod]();
|
|
}
|
|
}
|
|
_class = Sub;
|
|
function _subStaticPrivateMethod2() {
|
|
return babelHelpers.get(babelHelpers.getPrototypeOf(_class), "basePublicStaticMethod", this).call(this);
|
|
}
|
|
Object.defineProperty(Sub, _subStaticPrivateMethod, {
|
|
value: _subStaticPrivateMethod2
|
|
});
|