Let a decorated class body observe the class its decorators return - #38731
Open
robobun wants to merge 9 commits into
Open
Let a decorated class body observe the class its decorators return#38731robobun wants to merge 9 commits into
robobun wants to merge 9 commits into
Claude / Claude Code Review
completed
Aug 15, 2026 in 34m 37s
Code review found 1 important issue
Found 2 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 1 |
| 🟡 Nit | 0 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🔴 Important | src/js_parser/lower/lower_decorators.rs:1285-1293 |
relocate_static_fields gate lets private static fields and static auto-accessors slip through, breaking the all-or-nothi |
Annotations
Check failure on line 1293 in src/js_parser/lower/lower_decorators.rs
claude / Claude Code Review
relocate_static_fields gate lets private static fields and static auto-accessors slip through, breaking the all-or-nothing ordering invariant
The `relocate_static_fields` "all or nothing" gate only checks props for which `is_plain_static_field` is true, so a private static field or an undecorated `static accessor` contributes vacuously and never disables relocation — but neither is emitted through step 7's `static_element_order` loop. `@wrap class Foo { static y = B(); static #x = A(); }` now runs `A` (in-body) before `B` (relocated), and `@wrap class Foo { static a = ...; static accessor b = ...; }` now emits `__privateAdd(orig, _b,
Loading