Skip to content

fix(transformer): emit design:paramtypes when class has static anonymous class expression#20382

Merged
Dunqing merged 2 commits intooxc-project:mainfrom
babu-ch:fix/transformer-legacy-decorator-metadata-static-class-expr
Mar 15, 2026
Merged

fix(transformer): emit design:paramtypes when class has static anonymous class expression#20382
Dunqing merged 2 commits intooxc-project:mainfrom
babu-ch:fix/transformer-legacy-decorator-metadata-static-class-expr

Conversation

@babu-ch
Copy link
Contributor

@babu-ch babu-ch commented Mar 14, 2026

related rolldown/rolldown#8684

Fix design:paramtypes being silently dropped in release builds when a decorated class has static properties with anonymous class expression initializers (static Foo = class extends Error {}).

pop_constructor_metadata() was inside debug_assert!, which is a no-op in release builds, causing stack imbalance and missing metadata.

@github-actions github-actions bot added A-transformer Area - Transformer / Transpiler C-bug Category - Bug labels Mar 14, 2026
@codspeed-hq
Copy link

codspeed-hq bot commented Mar 15, 2026

Merging this PR will not alter performance

✅ 49 untouched benchmarks
⏩ 7 skipped benchmarks1


Comparing babu-ch:fix/transformer-legacy-decorator-metadata-static-class-expr (8b109c7) with main (fa70d5c)

Open in CodSpeed

Footnotes

  1. 7 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@babu-ch babu-ch force-pushed the fix/transformer-legacy-decorator-metadata-static-class-expr branch from 70a9c2a to fdc5705 Compare March 15, 2026 08:50
@Dunqing Dunqing force-pushed the fix/transformer-legacy-decorator-metadata-static-class-expr branch from fdc5705 to aa69bcc Compare March 15, 2026 13:43
@Dunqing Dunqing merged commit 1f65c3f into oxc-project:main Mar 15, 2026
28 checks passed
@babu-ch babu-ch deleted the fix/transformer-legacy-decorator-metadata-static-class-expr branch March 16, 2026 02:37
camc314 pushed a commit that referenced this pull request Mar 16, 2026
### 🐛 Bug Fixes

- edb8677 ecmascript: Treat collection constructor with variable arg as side-effectful (#20383) (Dunqing)
- 1f65c3f transformer: Emit design:paramtypes when class has static anonymous class expression (#20382) (bab)
- fa70d5c transformer: Use implementation signature for design:paramtypes when constructor is overloaded (#20394) (bab)
- ed5a7fb parser: Report syntax error for `new super()` (#20384) (Boshen)
- e62524d minifier: Treat object spread of getters as having side effects (#20380) (Boshen)
- f8fbd6e linter/plugins: Remove `hashbang` property from AST (#20365) (overlookmotel)

### ⚡ Performance

- 30a2b0f minifier: Use atom_from_strs_array for template literal concat (#20386) (Boshen)
- 690ce17 minifier: Use Vec::with_capacity for inline template expressions (#20389) (Boshen)
- 9cd612f linter/plugins: Recycle comment objects (#20362) (overlookmotel)

Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-transformer Area - Transformer / Transpiler C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants