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

Reserved Keywords Are Not Checked #9650

Open
CursedMun opened this issue Oct 16, 2024 · 0 comments · May be fixed by #9710
Open

Reserved Keywords Are Not Checked #9650

CursedMun opened this issue Oct 16, 2024 · 0 comments · May be fixed by #9710
Labels

Comments

@CursedMun
Copy link

Describe the bug

Reserved keywords only work one way: they are recognized if they exist in the input code, but it's not possible to prevent the mangler from creating a variable with a reserved keyword.

Input code

No response

Config

No response

Playground link (or link to the minimal reproduction)

https://play.swc.rs/?version=1.7.35&code=H4sIAAAAAAAAA2XSzWrCUBDF8X2e4iwVSsk58Sv0PbpPxRYhJKBtN6XvXp0zE5C6mLkI98eVv%2B9f0%2FHzPE8Y54%2FX4XIe3sbTddV8Dxc%2B3adidjE3MbcxdzH3MQ8x%2B5hsvXybvk7fpwFaoAnaoBFakRXlG6zIiqzIiqzIiqzISpdvaZPJ3eXe5N7m3uXe5z7k7nOzrUOJLJJlslCWymJZLgtmv7ysDstbS1bJKlklq2SVrJLVL7%2F1fljjpwGO83Sdx9PzrfQq%2BiL6Ivoi%2BiL6Ivoi%2BiL6Ivoi%2B%2BLh49pwbbg2XBuuDdeGa8O14drI2v9M5ftsyqZsyqZsyqZsymbXrl%2Ba36Z5%2BFvfvvoDUn78RPACAAA%3D&config=H4sIAAAAAAAAA41VS47bMAzdzykCocsuZlq0KHqA7nqCQSEoFuVoKkuGSHsSBLl7adnOZ0wb3QQxnx4pko%2FU%2BWm3U29YqZ%2B7M%2F%2Flj9ZkhHz9ZgueIpkjWxSdWsAq%2B5bU5xklHCBnAkIxXUZEkck10MAC%2FPL88m1iqJASwsyYbI2P3p3uY1apaTMg3tnYyi67BiLhI3%2FCcnofAMrdvX2fUgATNxBtUPtIUEOWHFcpBNMi6N5kwctwU5M9JinEAHYEVrc5tSIerSefIsdcohaM1VWyIEA%2BQ0W%2BB4nGsZgWkdMT8imwhX1X16XPH9jQm9AZEmLCsbSEbyt4PSSPpF0XpRKO4EoNRnAq7kemdzoDdTkueW%2FJx5We%2FAXgCgSDGE0Dkt9ywrGe1thuk%2BmjY8nSScBZ31KWEWouqvbeCZUdKgOZvNTNDLarYKhsJV1nglfKh96CBudYK4JrfPdUHaSgw6AnJwDcX%2BMkVY2Avk7hCj4MxAb8i7MkWWDTicbQYR3FU7NPYSNAA3RIduMAt4LSOpx5SxzbdbyLFlgaYMUjHRZguQR4ACjpUPblQhs8HuxR1yHtxTXRss5LE79Otst1OTcm1mUJnGWx3cxFSrz4%2B3LDV%2FVJ%2FbmFuDwIbu2UotQG6CGsTc1%2FTOQmyqXohyGaF8liWcAPaQYMz7l%2FeX54pTinp%2Fm3ZKeaZLu7UpURGF%2Bv7%2Bp2aH6o5hYoj79n4uj98g%2F8o0LlUwcAAA%3D%3D

SWC Info output

No response

Expected behavior

The expected behavior would be that reserved keywords are handled both ways: they should be recognized and avoided not only in the input code but also when generating or mangling new variable names. The mangler should ensure that no variable is created using a reserved keyword.

Actual behavior

No response

Version

1.7.36

Additional context

#9648 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

4 participants
@CursedMun and others