-
-
Notifications
You must be signed in to change notification settings - Fork 721
fix(mangler): mangle private class members used in nested classes properly #14218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(mangler): mangle private class members used in nested classes properly #14218
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a bug where private class members used in nested classes were not being mangled properly. The fix ensures that when generating code for private identifiers, the mangler searches through all enclosing class scopes (from innermost to outermost) to find the correct mangled name, rather than only looking at the current class scope.
- Updates the private identifier code generation to search through all enclosing class scopes
- Adds test cases for nested classes that access outer class private members and handle name shadowing
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/oxc_codegen/src/gen.rs | Modified private identifier generation to search through all enclosing class scopes |
| crates/oxc_minifier/tests/mangler/mod.rs | Added test cases for nested classes with private member access |
| crates/oxc_minifier/tests/mangler/snapshots/private_member_mangling.snap | Updated test snapshots with expected output for new test cases |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
CodSpeed Instrumentation Performance ReportMerging #14218 will not alter performanceComparing Summary
Footnotes |
Merge activity
|
7b2ca9f to
b83ffe5
Compare

fixes #14209
refs #14027