Skip to content
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: decorator binds getter/setter to ctx.access for public fields #16201

Merged
merged 1 commit into from Jan 8, 2024

Conversation

liuxingbaoyu
Copy link
Member

Q                       A
Fixed Issues? Ref: #16117
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass?
Documentation PR Link
Any Dependency Changes?
License MIT

https://arai-a.github.io/ecma262-compare/?pr=2417&id=sec-createdecoratoraccessobject
I tried reading the spec and it seems that the closure only needs to capture the name, not the getter.
Technically, we are not compliant with the spec for private fields, but it seems unlikely that there will be an observable behavioral difference, and that would require more than just modifying the helper, so I'm not doing that yet.

@liuxingbaoyu liuxingbaoyu changed the title fix: decorator binds getter or setter to ctx.access for public fields fix: decorator binds getter/setter to ctx.access for public fields Jan 1, 2024
@babel-bot
Copy link
Collaborator

babel-bot commented Jan 1, 2024

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/56092/

@liuxingbaoyu liuxingbaoyu added PR: Bug Fix 🐛 A type of pull request used for our changelog categories Spec: Decorators labels Jan 1, 2024
@nicolo-ribaudo nicolo-ribaudo merged commit 0427910 into babel:main Jan 8, 2024
48 checks passed
@liuxingbaoyu
Copy link
Member Author

@nicolo-ribaudo Sorry for my title is not clear enough, according to the specifications get/set should not be bound to ctx.access, in fact I mean that we have fix this issue. :)

@nicolo-ribaudo
Copy link
Member

Oh right -- I changed the title because I was trying to make it fit in the commit length.

@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Apr 9, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Bug Fix 🐛 A type of pull request used for our changelog categories Spec: Decorators
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants