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
Outer x is expected to be undefined; by hoisting, x = 0 is assigning 0 to the inner x so the outer x remains the same.
By the way, it becomes 0 in the output code.
Input code
letx;switch(x){case{ x =0}={} : functionx(){}};console.log(x);
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
Outer
x
is expected to beundefined
; by hoisting,x = 0
is assigning0
to the innerx
so the outerx
remains the same.By the way, it becomes
0
in the output code.Input code
Config
No response
Playground link
https://play.swc.rs/?version=1.3.11&code=H4sIAAAAAAAAA8tJLVGoULBWKC7PLEnOUNAAcjQVqhWSE4tTgVSFgq2CgUItkKyuVbBSSCvNSy7JzM8DimtogoRqrbmS8%2FOK83NS9XLy0zUqNK0BYQzYnVAAAAA%3D&config=H4sIAAAAAAAAA0WMTQrEIAxG75K1286id5hDBCctFv9IUhgR714tlu7C915ehUMsrBUyshCPS0pU%2FMMKZAOKZZcVTNf6tKEXagYUeScdiiyd%2BZSEJjUQXHRbGSWbQmYSeRHG3T9m66GQfucYKmjJdAc%2F0N7G%2FHPynaLySe0Cj9ke9LUAAAA%3D
Expected behavior
x
is expected to beundefined
:Actual behavior
x
is0
in the output code:Version
1.3.11 (default SWC playground)
Additional context
No response
The text was updated successfully, but these errors were encountered: