Files
7e13d30e73 [static blocks] Do not inject new static fields after static code (#17443)
* [static blocks] Do not inject new static fields after static code

* Update fixtures

* Less parentheses

* Avoid temp variable

* Preserve class name

* Fix Babel 8

* Fix ts

* fix ts again

* harden new-target test

* Fix old Babel 7 compat

---------

Co-authored-by: Huáng Jùnliàng <[email protected]>
2025-07-28 15:25:17 -04:00

10 lines
221 B
JavaScript

class Base {
constructor() {
var _staticBlock;
this.Foo = (class {
static #_ = _staticBlock = () => (this.foo = new.target, this);
}, _staticBlock());
}
}
expect(new Base().Foo.foo).toBe(undefined);