Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: decorator binds getter/setter to ctx.access for public fields#16201

Merged
nicolo-ribaudo merged 1 commit into
babel:mainfrom
liuxingbaoyu:fix-access-this
Jan 8, 2024
Merged

fix: decorator binds getter/setter to ctx.access for public fields#16201
nicolo-ribaudo merged 1 commit into
babel:mainfrom
liuxingbaoyu:fix-access-this

Conversation

@liuxingbaoyu
Copy link
Copy Markdown
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
Copy Markdown
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
@liuxingbaoyu
Copy link
Copy Markdown
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
Copy Markdown
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.

4 participants