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: Class decorator correctly passes return value #16199
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/56084/ |
14b3e6f
to
54fb46d
Compare
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.
Can we rename the test case to decorator-access-modified-classes
? We already have decorator-access-modified-{fields,methods}
for the same purposes.
I updated the PR's description, I hope it can help reviewers pick up the PR's intention. Please do fill in the descriptions in the PR template, it will also help our future selves when trying to understand why changes are made. |
Thanks! |
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.
👍
CI error is not related. |
Edit by @JLHwung
In this PR we fix a regression introduced in #16160. Currently when multiple class decorators are applied, they are provided with the unmodified classes, this is incorrect as per 15.7.7 ApplyDecoratorsToClassDefinition step 1.e, the next decorator should be applied on the modified class.