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
An identifier named Object is treated as a global reference even if it's inside a with statement. The object passed to the with statement might contain Object property.
I checked that this is not written in the assumptions.
Describe the bug
An identifier named
Object
is treated as a global reference even if it's inside awith
statement. The object passed to thewith
statement might containObject
property.I checked that this is not written in the assumptions.
swc/crates/swc_ecma_minifier/src/lib.rs
Lines 5 to 15 in 85fb16c
Input code
Config
No response
Playground link (or link to the minimal reproduction)
https://play.swc.rs/?version=1.10.6&code=H4sIAAAAAAAAA0vOzysuUUjLz1ewVajm5VJQ8E%2FKSk0usVJIzkksLoYIKSgkg1QVlSaX5BdpaCpUg%2Fn5Oal6OfnpGurOCEl1TYVakA4gAUTlmSUZChpAszWRzYHpy0sth1qmoakJVg8A07%2FfAIwAAAA%3D&config=H4sIAAAAAAAAA32UO5LbMAyG%2Bz2FR3WKnS1S5ADpcgYOTYIyHZLQEKDXmh3fPdDDj6whdxI%2B%2FAAJgPh62%2B26I7nu1%2B5LPuVnsJWg3v7FQmNhexZLBy5bcjUO3P240iNNKNhEMJsuC%2BnY1h54VtHH%2B8f7qugSIsFVsdpyLDGMjzkd5qEC0YNNrBKyZShM%2F%2BtXVvFzAlzbo32PmMCWF8RYMrEw9FC1wA5TsgOBOdmqRJlOamsk1FJMsDF4M1QcVF585IhFcj5TD9Ybhx4UFCs4jifQZJJLZIXkesp9Zuxh3%2Fp%2B7vM3NZxsapaVnHCeWyKnVaIeMBKb0IpWwgVu1GCBa3G%2FK2MwFbjV8qw7YiwbPfkLIBVIlqjYDFrc2SPIPG2pw0tlLEFGlkeFy3xrtyzQS1FNjEGp7FQZqBy1blbwzcFUWacdZ8Ub5aPowUAIMitKaPqM7A5aUh4HwKAA6a8N2lQtwNxe4QafHsQL%2FFtuyfqArR7Z8mGb0pj3mF4kyMAH9C8cpBWM27jKljgP27wVDzIa4FWXRjN4XgLyABhNmvfl02zI85CIpk%2B4v6%2BJ1eFy28PZlv7%2B3pdV%2FLY6dBl9m%2BG65Kf%2BLqv5Z3d3um7h28G7SH%2BuyiXs5R%2BuiUkIMQYAAA%3D%3D
SWC Info output
No response
Expected behavior
The code to be output as-is.
Constructor
is output in console.Actual behavior
new Object()
is replaced with{}
.Constructor
is not output in console.Version
1.10.6
Additional context
This is not something I encountered with a real world code so it's probably fine to deprioritize this issue.
The text was updated successfully, but these errors were encountered: