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

Disallow #a in #b in c and similar expressions #13727

Merged
merged 6 commits into from Sep 4, 2021

Conversation

@nicolo-ribaudo
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo commented Sep 2, 2021

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

@babel-bot
Copy link
Collaborator

@babel-bot babel-bot commented Sep 2, 2021

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

@codesandbox
Copy link

@codesandbox codesandbox bot commented Sep 2, 2021

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 7779a6c:

Sandbox Source
babel-repl-custom-plugin Configuration
babel-plugin-multi-config Configuration

Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
@JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Sep 3, 2021

Can you add a new test case?

class C {
  #x;
  async test() {
    await #x in this
  }
}

It was parsed successfully but should throw, probably fixed in this PR.

@@ -504,7 +531,7 @@ export default class ExpressionParser extends LValParser {
const startLoc = this.state.startLoc;

return this.parseExprOp(
this.parseMaybeUnary(),
this.parseMaybeUnaryOrPrivate(),

This comment has been hidden.

JLHwung
JLHwung approved these changes Sep 3, 2021
@nicolo-ribaudo nicolo-ribaudo merged commit 44388e6 into babel:main Sep 4, 2021
26 of 28 checks passed
@nicolo-ribaudo nicolo-ribaudo deleted the private-in-private-in branch Sep 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

5 participants