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 the transform of super.foo--/super[foo]-- (and prefix) #14162

Merged
merged 2 commits into from Jan 16, 2022
Merged

Fix the transform of super.foo--/super[foo]-- (and prefix) #14162

merged 2 commits into from Jan 16, 2022

Conversation

magic-akari
Copy link
Contributor

@magic-akari magic-akari commented Jan 16, 2022

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

@magic-akari magic-akari marked this pull request as ready for review January 16, 2022 11:18
@magic-akari magic-akari changed the title Fix the transform of super.foo--/super[foo]--/--super.foo/--super[foo]/ Fix the transform of super.foo--/super[foo]--/--super.foo/--super[foo] Jan 16, 2022
@nicolo-ribaudo nicolo-ribaudo added the PR: Bug Fix 🐛 A type of pull request used for our changelog categories label Jan 16, 2022
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.

Thanks!

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.

Thanks.

Not related to this PR, but we need to add logical assignment support to super property transforms (they should have been extracted to a new helper):

class A extends B {
  async foo() {
    super.foo ??= 1;
  }
}

currently throws

@nicolo-ribaudo nicolo-ribaudo changed the title Fix the transform of super.foo--/super[foo]--/--super.foo/--super[foo] Fix the transform of super.foo--/super[foo]-- (and prefix) Jan 16, 2022
@nicolo-ribaudo nicolo-ribaudo merged commit 693f2d2 into babel:main Jan 16, 2022
@nicolo-ribaudo
Copy link
Member

I slightly reworded the PR title to fit in a commit message

@magic-akari
Copy link
Contributor Author

Thanks.

Not related to this PR, but we need to add logical assignment support to super property transforms (they should have been extracted to a new helper):

class A extends B {
  async foo() {
    super.foo ??= 1;
  }
}

currently throws

I am willing to fix it .Should I open a new issue?

@magic-akari magic-akari deleted the fix/issue-14161 branch February 4, 2022 03:26
@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 May 6, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 6, 2022
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: Classes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: get wrong result after transform Update assignment expression in async method
3 participants