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

classStaticPrivateFieldDestructureSet get wrong result #4493

Closed
magic-akari opened this issue May 1, 2022 · 1 comment · Fixed by #4136
Closed

classStaticPrivateFieldDestructureSet get wrong result #4493

magic-akari opened this issue May 1, 2022 · 1 comment · Fixed by #4136
Labels
Milestone

Comments

@magic-akari
Copy link
Member

Describe the bug

Input code

class A {
    static #a = 1;
    foo() {
        ({ x: A.#a } = { x: 3 });
        console.log(A.#a);
    }
}

new A().foo();

Config

{
  "jsc": {
    "parser": {
      "syntax": "ecmascript"
    },
    "target": "es2021"
  },
  "module": {
    "type": "es6"
  },
  "isModule": true
}

Playground link

Playground

Expected behavior

print 3

Actual behavior

Uncaught TypeError: Private static access of wrong provenance

Version

1.2.174

Additional context

No response

@swc-bot
Copy link
Collaborator

swc-bot commented Oct 16, 2022

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@swc-project swc-project locked as resolved and limited conversation to collaborators Oct 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging a pull request may close this issue.

3 participants