es/minifier
: Labelled loops in combination with continue
can lead to name clash
#9871
Labels
es/minifier
: Labelled loops in combination with continue
can lead to name clash
#9871
Describe the bug
Using any code that uses a loop with a label, and a
continue label
statement may end up with name clashes:is compiled to
which leads to a name conflict between the label
i
and the variablei
.Input code
Config
Playground link (or link to the minimal reproduction)
https://play.swc.rs/?version=1.10.7&code=H4sIAAAAAAAAA8svLUktslJIyy9S0MhJLVHIVLBVMLAGUjYKhgYghra2pkI1L5cCEMAVZUMUZcMUZSMpAoHMNAUNoBpbW6C0gpoayFAwW1MhOT%2BvJDOvNFUhH2SvNURLLS9XLQAlydKLiAAAAA%3D%3D&config=H4sIAAAAAAAAA32QQQ6CMBBF95yCzNqFLjTGO3gGM6kDKba06RQiIdzdFqiCEjdt5%2F83M%2BnvszyHigVc8j48Q2HRMbl3HRTuao%2FPoAAJjSyctB52ya04WgUqplEaJgc8upL82MXHGQdlDFPCZ03LWhbdcqEw2jpiXoMRxbpUtEDjHmMVtaS%2B4WA9iOxNKGSuUdPPuEQUf13rZIuewm3sFiTpvKEyFujkYb%2BKJoSTpXOMCbS5N4sPge8sTZGd4AOlgLxrxh0g%2BZoao5YNL76116fHAQAA
SWC Info output
No response
Expected behavior
I would've expected the code to work, and there wouldn't be any name conflicts between the label and any variables.
Actual behavior
The label, which has been renamed to
i
in the compilation, now clashes with the variablei
.Version
1.10.7
Additional context
No response
The text was updated successfully, but these errors were encountered: