Skip to content

Substitute this and inner class name in relocated static initializers during decorator lowering - #31922

Open
robobun wants to merge 2 commits into
mainfrom
farm/68d18d98/decorator-static-init-scope
Open

Substitute this and inner class name in relocated static initializers during decorator lowering#31922
robobun wants to merge 2 commits into
mainfrom
farm/68d18d98/decorator-static-init-scope

transpiler: substitute this and inner class name in relocated static …

c3d3e1d
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jun 6, 2026 in 36m 32s

Code review found 5 potential issues

Found 5 candidates, confirmed 5. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit src/js_parser/lower/lower_decorators.rs:2105-2117 rewrite_expr/rewrite_stmts coverage gaps leave some this/inner-name refs unrewritten

Annotations

Check warning on line 2117 in src/js_parser/lower/lower_decorators.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

rewrite_expr/rewrite_stmts coverage gaps leave some this/inner-name refs unrewritten

Heads-up: the `rewrite_expr`/`rewrite_stmts` walker these new call sites depend on is not exhaustive, so a few shapes of `this`/inner-name reference are still left unrewritten after relocation — e.g. inside a nested `EClass` (line 505, wrong for `ReplaceRef`), in arrow/function default-parameter values (492–504), in computed object-literal keys (473–481), under `EAwait`/`EYield` (catch-all at 506), and inside `SFunction`/`SClass` declarations reached via `rewrite_stmts` (catch-all at 637). These