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

Unexpected enum variant in AssignExpr #8377

Closed
shqld opened this issue Dec 4, 2023 · 3 comments · Fixed by #8314 or #8523
Closed

Unexpected enum variant in AssignExpr #8377

shqld opened this issue Dec 4, 2023 · 3 comments · Fixed by #8314 or #8523
Assignees
Labels
Milestone

Comments

@shqld
Copy link

shqld commented Dec 4, 2023

Describe the bug

Expressions in left of AssignExpr are PatOrExpr::Pat(Pat::Expr(_)) instead of PatOrExpr::Expr(_), but this looks inconsistent with documentation.

/// Only for for-in / for-of loops. This is *syntactically* valid.
#[tag("*")]
Expr(Box<Expr>),

I'm not sure if it's the documentation or the implementation that might be incorrect, or if I might have misunderstood something.

Input code

o.n = 42;

Config

No response

Playground link (or link to the minimal reproduction)

https://github.com/shqld/repro/tree/swc/8376

SWC Info output

No response

Expected behavior

Either documentation or implementation is corrected.

Actual behavior

No response

Version

swc_ecma_ast = "0.110.12", swc_ecma_parser = "0.141.30"

Additional context

No response

@shqld shqld added the C-bug label Dec 4, 2023
@kdy1 kdy1 added this to the Planned milestone Dec 7, 2023
kdy1 added a commit that referenced this issue Jan 19, 2024
**Related issue:**

 - Closes #8157
 - Closes #8377
@kdy1 kdy1 closed this as completed in bc38ac9 Jan 21, 2024
@kdy1 kdy1 modified the milestones: Planned, v1.3.106 Jan 24, 2024
@kdy1 kdy1 reopened this Jan 26, 2024
@kdy1
Copy link
Member

kdy1 commented Jan 26, 2024

Reopening as I closed this by my mistake

@kdy1 kdy1 self-assigned this Jan 30, 2024
@kdy1
Copy link
Member

kdy1 commented Feb 6, 2024

Closing as fixed by #8604

@kdy1 kdy1 closed this as completed Feb 6, 2024
@kdy1 kdy1 modified the milestones: Planned, v1.4.0 Feb 6, 2024
@swc-bot
Copy link
Collaborator

swc-bot commented Mar 7, 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 Mar 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3 participants