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

Add delete obj?.#x.a support #11669

Merged
merged 1 commit into from Jun 23, 2020
Merged

Add delete obj?.#x.a support #11669

merged 1 commit into from Jun 23, 2020

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Jun 3, 2020

Q                       A
Fixed Issues? Fixes #11657
Patch: Bug Fix? Yes
Tests Added + Pass? Yes
License MIT

This PR is a follow-up to #11248, which supports delete obj?.#x.a in a similar way of #10806.

This PR includes commits in #11662, I will rebase once that one is merged.

@JLHwung JLHwung added PR: Spec Compliance 👓 A type of pull request used for our changelog categories Spec: Class Fields Spec: Optional Chaining labels Jun 3, 2020
@babel-bot
Copy link
Collaborator

babel-bot commented Jun 3, 2020

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

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 3, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit f226bc8:

Sandbox Source
epic-water-vb7mb Configuration
xenodochial-elgamal-i30u6 Configuration

function fnDeep() {
return deep;
}
expect(() => delete Foo?.#self.unicorn).toThrow(TypeError);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since unicorn is non configurable, delete Foo.#self.unicorn will throw TypeError, so we are sure that the regular path is invoked indeed.

Copy link
Member

Choose a reason for hiding this comment

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

clever!

@JLHwung JLHwung changed the base branch from master to main June 19, 2020 12:41
@JLHwung JLHwung merged commit 6591114 into babel:main Jun 23, 2020
@JLHwung JLHwung deleted the fix-11657 branch June 23, 2020 20:10
@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 Sep 23, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2020
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: Spec Compliance 👓 A type of pull request used for our changelog categories Spec: Class Fields Spec: Optional Chaining
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Babel should transform delete obj?.#x.a
4 participants