You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
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.
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)
The text was updated successfully, but these errors were encountered: