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

Incorrect minification of (obj?.a).b #8398

Closed
SukkaW opened this issue Dec 7, 2023 · 1 comment · Fixed by #8399
Closed

Incorrect minification of (obj?.a).b #8398

SukkaW opened this issue Dec 7, 2023 · 1 comment · Fixed by #8399
Assignees
Labels
Milestone

Comments

@SukkaW
Copy link
Contributor

SukkaW commented Dec 7, 2023

Describe the bug

As the title.

Input code

(obj?.a).b

Config

{
  "jsc": {
    "parser": {
      "syntax": "typescript",
      "tsx": true
    },
    "target": "es2022",
    "minify": {
      "compress": true,
      "mangle": true
    },
    "loose": false
  },
  "isModule": true,
  "minify": true
}

Playground link (or link to the minimal reproduction)

https://play.swc.rs/?version=1.3.101-nightly-20231207.1&code=H4sIAAAAAAAAA9PIT8qy10vU1EsCAAYRshYKAAAA&config=H4sIAAAAAAAAA22NPQ7DIAxG954Cec5QMfYOPQSiTkTEn2xHKopy9wJNUYds%2BD19j%2F2mFKxs4aH2%2BqxHNsRI466ESxTzrgSkZGRLLgtMPyvclNCGnRxfAWJoQWkjZH3X%2BhxAcNHN5T9vU8iEzGdlhIOJi8ertk%2BJm5iN52Y6B8fP9NrGorPxW28cHzjNEnLuAAAA

SWC Info output

No response

Expected behavior

(obj?.a).b;

Actual behavior

obj?.a.b;

Version

1.3.101-nightly-20231207.1

Additional context

No response

@SukkaW SukkaW added the C-bug label Dec 7, 2023
@kdy1 kdy1 added this to the Planned milestone Dec 7, 2023
@kdy1 kdy1 assigned kdy1 and unassigned kdy1 Dec 9, 2023
kdy1 pushed a commit that referenced this issue Dec 11, 2023
@kdy1 kdy1 modified the milestones: Planned, v1.3.101 Dec 18, 2023
@swc-bot
Copy link
Collaborator

swc-bot commented Jan 17, 2024

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 Jan 17, 2024
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