Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Bug]: (Crash) Using private static fields with in operator in itself #6373

Closed
p51lee opened this issue Nov 8, 2022 · 2 comments · Fixed by #6468
Closed

[Bug]: (Crash) Using private static fields with in operator in itself #6373

p51lee opened this issue Nov 8, 2022 · 2 comments · Fixed by #6468
Labels

Comments

@p51lee
Copy link

p51lee commented Nov 8, 2022

Describe the bug

The input program is expected to be terminated without error, but SWC fails to transpile it.

Input code

class x { static #y = #y in x ; }

Config

No response

Playground link

https://play.swc.rs/?version=1.3.14&code=H4sIAAAAAAAAA0vOSSwuVqhQqFYoLkksyUxWUK5UsAURmXlAUWuFWgCOG5gLIQAAAA%3D%3D&config=H4sIAAAAAAAAA0WMSwrDMAxE76K1t%2B0id8ghhKsEF%2F%2BQFIgxvnvlkpCdZubpdfiKh6VDRRbieUnLiicsQD6heA5VwRlm1YZRaDhQ5J10IvKyLZYidK0OUshha9PkS6pMIs%2BEeY83OUyUyueYRQdtlf7CN4zHoXzYW5D14mYeP5P5%2B3m0AAAA

Expected behavior

input.js is terminated normally:

$ node input.js # no error

Actual behavior

SWC fails to transpile input.js:
image

Version

1.3.14 (default SWC playground)

Additional context

No response

@p51lee p51lee added the C-bug label Nov 8, 2022
@alexander-akait
Copy link
Contributor

alexander-akait commented Nov 8, 2022

For tests purposes, also failed with:

class a2 { static #y = y in x ; }
class a3 { static #y = ++y in x ; }

@swc-bot
Copy link
Collaborator

swc-bot commented Dec 21, 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 Dec 21, 2022
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Development

Successfully merging a pull request may close this issue.

3 participants