Skip to content

fix: Decorators when super() exists and protoInit is not needed#16385

Merged
nicolo-ribaudo merged 3 commits intobabel:mainfrom
liuxingbaoyu:fix-super-protoInit
Mar 27, 2024
Merged

fix: Decorators when super() exists and protoInit is not needed#16385
nicolo-ribaudo merged 3 commits intobabel:mainfrom
liuxingbaoyu:fix-super-protoInit

Conversation

@liuxingbaoyu
Copy link
Member

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

@liuxingbaoyu liuxingbaoyu added PR: Bug Fix 🐛 A type of pull request used for our changelog categories Spec: Decorators labels Mar 25, 2024
@babel-bot
Copy link
Collaborator

babel-bot commented Mar 25, 2024

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

}
}

const r = new TestChild();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In contrast with initProto-existing-derived-constructor, can you rename this test to initField-existing-derived-constructor?

I suggest we also add some behaviour assertions like we have done in that test.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried porting all the tests but unfortunately couldn't get them all to work so I just added a simple test.🤦‍♂️

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you push the new tests? Even if they are failing, we can still investigate for sure.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
I pushed it, but it doesn't show up on github, I will try force pushing.🤔

Copy link
Member Author

@liuxingbaoyu liuxingbaoyu Mar 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I re-added all the tests, but I'm not sure if I tested the behavior well, thanks for the review!

Copy link
Contributor

@JLHwung JLHwung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. The new tests look go to me. 👍

Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@nicolo-ribaudo nicolo-ribaudo merged commit f0a63db into babel:main Mar 27, 2024
@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 Jun 27, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 27, 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.

[Bug]: Decorators | Error when calling super in constructor of extended class when decorating accessors.

4 participants