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(es/es2015): Fix injection location of this for getter/setter properties #8993

Merged
merged 11 commits into from
May 31, 2024

Conversation

kdy1
Copy link
Member

@kdy1 kdy1 commented May 28, 2024

@kdy1 kdy1 added this to the Planned milestone May 28, 2024
@kdy1 kdy1 self-assigned this May 28, 2024
@kdy1 kdy1 requested a review from a team as a code owner May 28, 2024 22:54
kodiakhq[bot]
kodiakhq bot previously approved these changes May 28, 2024
Copy link
Member Author

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

swc-bump:

  • swc_ecma_compat_es2015
  • swc_core

magic-akari
magic-akari previously approved these changes May 29, 2024
@KyleDavidE
Copy link

Pathological example but I think this change might break on arrow functions being inside of computed property names. Can you try:

const o1 = {
  x: "a",
  foo() {
    const o2 = {
      get [(() => this.x)()]() {
        return 1;
      },
    };
    console.log(o2.a === 1);
  },
};

o1.foo();

@kdy1 kdy1 enabled auto-merge (squash) May 30, 2024 04:54
@kdy1 kdy1 disabled auto-merge May 30, 2024 04:55
@magic-akari magic-akari dismissed stale reviews from kodiakhq and themself via 13b5fc6 May 30, 2024 05:40
kodiakhq[bot]
kodiakhq bot previously approved these changes May 30, 2024
kodiakhq[bot]
kodiakhq bot previously approved these changes May 30, 2024
@kdy1 kdy1 enabled auto-merge (squash) May 30, 2024 09:34
@magic-akari magic-akari disabled auto-merge May 30, 2024 10:03
@magic-akari magic-akari enabled auto-merge (squash) May 30, 2024 11:31
Copy link
Collaborator

@swc-bot swc-bot left a comment

Choose a reason for hiding this comment

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

Automated review comment generated by auto-rebase script

Copy link
Collaborator

@swc-bot swc-bot left a comment

Choose a reason for hiding this comment

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

Automated review comment generated by auto-rebase script

Copy link
Collaborator

@swc-bot swc-bot left a comment

Choose a reason for hiding this comment

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

Automated review comment generated by auto-rebase script

@magic-akari magic-akari merged commit 09121a6 into swc-project:main May 31, 2024
147 checks passed
@kdy1 kdy1 modified the milestones: Planned, v1.5.25 Jun 5, 2024
@kdy1 kdy1 deleted the issue-8992 branch June 7, 2024 04:33
@swc-project swc-project locked as resolved and limited conversation to collaborators Jul 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Arrow functions inside of getters/setters on object literals use the wrong this
4 participants