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
The hoisted var variable can be accessed without ReferenceError, but its value is undefined before initialization.
Currently minifier doesn't care about this and inlines it using the invalid value in declaration statement.
Describe the bug
The hoisted
var
variable can be accessed without ReferenceError, but its value isundefined
before initialization.Currently minifier doesn't care about this and inlines it using the invalid value in declaration statement.
Input code
Config
Playground link (or link to the minimal reproduction)
https://play.swc.rs/?version=1.4.6-nightly-20240307.1&code=H4sIAAAAAAAAA0srzUsuyczPU0jLz9fQVKjmUlBIzs8rLlFIVLBVqLAGcssSixQqgBwTIxCvKLWktChPIdGaq5aLC6QyPydVLyc%2FXQOsXxMANYklvk8AAAA%3D&config=H4sIAAAAAAAAA32US5LjIAyG932KlNe9nVnMAXo3Z6AICIc0IBcS6bi6cveRH3lMR87O1qcHSD%2F6ftvtuiO57s%2FuWz7lZ7CVoN7%2BxUJjYXsWSwcuW3I1Dty9X%2BmRJhRsIphNl4V0bGsPPEfRr9W9S4gEV%2FfVlmOJYXws6DAPFYgebGKVfC1DYfo%2FfmUVvybAtT3a94gJbHlBjCUTC0MPVUvsMCU7EJiT3eBZGhYJtRoTbAzeDBUHlRcfOWKRpM%2FUg%2FXGoQcFxQqO4wm0MKklYYXkfsqBZ%2Bxh3%2Fp%2BnvKPaDjZ1CwrNeE8z0ROq2Q9YCQ2oRWtRwvc6MEC1%2B7%2BYDGYCtxqeUZHjGUj6hNAGpAsUbEZtAPNHkH0tBUdXkbGEkSyPCpc9K1dskAvPTUxBqWxU2OgctSGWcE3B1NjnXacFW9ok6IHAyGIVJTU9BXZHbSiPA6AQQEyXhs0US3A3F7hBp%2Fewwv8IbdkXV%2BrR7Z82KY05j2mFwUy8AH9CwcZBeM2rrIlzsM2b8WDSAO86tJoBs87QPTPaNK8LJ%2B0Ia9DMpo%2B4f6%2BJVaHy20JZ1v6%2B3Nf9vDb6tBl9G2G64af5rvs5d%2Fd3em6hW8H7yL9vUbORS%2F%2FAI2shQwtBgAA
SWC Info output
No response
Expected behavior
or don't inline function
Actual behavior
Version
1.4.6-nightly-20240307.1
Additional context
No response
The text was updated successfully, but these errors were encountered: