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
I'm using
crates/swc_ecma_transforms_optimization/src/simplify/expr/mod.rs#expr_simplifier
and found this bug.Using
Compress
option will reproduce the bug in the playground, but I'm not sure whatexpr_simplifier
is used in the playground.(true && o.f)``; is simplify to o.f`` , which causes
this
pointing to a wrong object.Input code
Config
No response
Playground link
https://play.swc.rs/?version=1.3.7&code=H4sIAAAAAAAAA8tJLVHIV7BVqObiTNPQBFGcicXFqUUlevnZGiUZmcUKira2Cvma1lyctVy11lwahjoK%2BXppmgkJ1lwABzEzUjwAAAA%3D&config=H4sIAAAAAAAAA22TQZLjIAxF7%2BJ1FjO97APMrs9AERAOaUAuJNJxpXL3EY4NcdI76%2FlLiC9xG85khs%2FbMOlMkOsXzYn1dfgcwERNJvuJh4PIBDkdCO6HgXUegauEPv58%2FJXfAZFgFRyG6JN3cy1mME4ZiOq3JJUIianpdM74IyHnItERMYBOb7HSpHxiGCH3VIMh6IlAXXRuGfU0nT1h2qHCYNWUcXqiyXr2mKTYxixoqwxaaMBnMOwv0CVSQySJpLHWyQItHMs4VgMfSrjoUDS3WnBdbJATW94JPbFyJdEL2nX6QI9LrirvVAYuOW2aM%2Fq08%2BEbQPoMmijpCD1z4U7msFe6X1Q%2BORkiz43KhHtXCUa5nPLetRvWriGz725lsMVAvaHpxVe4uxB5CwqcE7dbMv14NqdejOcJ0LVQXNOuz%2BARqm2f9rSuwBv8J13x8zhWHjWfXhnN8YjhrUQEPqF9w2IE4yvMsr3X6ZWWZEFsBvv0o1AN25rK8BlVqK9t81kWQnLUGPDY1lceZdRpbGt5rwBtqeC2mCevVYyImM403PsT3XaKvlb1Uu0%2FcmhO6BcEAAA%3D
Expected behavior
(true && o.f)``; should simplify to (o.f)``
Actual behavior
(true && o.f)``; is simplify to o.f`` .
Version
1.3.7
Additional context
Esbuild also has the problem: evanw/esbuild#2610
The text was updated successfully, but these errors were encountered: