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
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.
Describe the bug
SWC generates wrong variable names if it collides with object type definition key.
In the image you can see that it transpiles
event
toevent1
everywhere except in the last line, which of course throws an error.Input code
Config
No response
Playground link
https://play.swc.rs/?version=1.3.21&code=H4sIAAAAAAAAA22MywrCMBBF9%2FmKu2sCUuO2pfoTLgRxIXUsgSZTkrEgIf9u62Pn7t7D4Tg%2FcRTIcyKccI%2FsUdXb9aaqVarnkAQ0UxB0yGVBieToPPFDtDbo9sgKWD0eqR550G%2FbqC8VXHtxy2iQcf6UXECS6MJwOTSY2d1QfvW%2FqbLBzlprWvUCa1ejba8AAAA%3D&config=H4sIAAAAAAAAA0WNSwrDMAxE76J1FsWLLnKHHsK4SnDxD40CDcZ3rx1cspNmnp4qfeBorVSsgGVMOJPaL62kZ2E48UVpIUWPNhvArS9WdtaOMMzDmF6HnMETWCj65LdzyFyORRi4K5v28Cdbd8X8PkZQr3%2BX80ntdsw7j9cEVQ5uPx%2Bqcl%2B4AAAA
Expected behavior
Variable name to be consistent across its lifetime.
Actual behavior
No response
Version
1.3.21
Additional context
No response
The text was updated successfully, but these errors were encountered: