Files
Huáng JùnliàngandGitHub 980dcb8b01 Memoize class binding when compiling private methods and static elements (#15701)
* add test cases

* fix: memoise class binding when lowering static elements and private methods

* update test fixtures

* update test fixtures
2023-07-19 17:59:21 -04:00

13 lines
318 B
JavaScript

var _class;
var _ = /*#__PURE__*/babelHelpers.classPrivateFieldLooseKey("_");
class Foo {}
_class = Foo;
Object.defineProperty(Foo, _, {
writable: true,
value: 42
});
// static block can not be transformed as `#_` here
_class.foo = babelHelpers.classPrivateFieldLooseBase(_class, _)[_];
expect(Foo.foo).toBe(42);