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

19 lines
365 B
JavaScript

var _staticBlock;
class C {
static #_ = _staticBlock = () => ((/* before 1 */(() => {})()
/* after 1 */
/* before 2 */
), /* before this.foo */this.foo = 42
/* after this.foo */
/* after 2 */
/* before 3 */, ((() => {
/* before this.bar */
this.bar = 42;
this.bar = 42;
/* after this.bar */
})() /* after 3 */));
}
_staticBlock();