When a label has the same name as a variable that has been renamed due to let/const transpilation, the label may also be renamed.
This should not happen, since labels do not follow the same scope rules as variables.
This commit prevents labeled continues and label statements from being renamed, fixing the issue.
Labeled break were not buggy, as breaks do not initialise their children anyway, but this commit also adds breaks to the list of renames to skip, for consistency.
See the added tests for examples that were previously buggy.
When a label has the same name as a variable that has been renamed due to let/const transpilation, the label may also be renamed. This should not happen, since labels do not follow the same scope rules as variables. This commit prevents labeled continues and label statements from being renamed, fixing the issue. Labeled break were not buggy, as breaks do not initialise their children anyway, but this commit also adds breaks to the list of renames to skip, for consistency.
See the added tests for examples that were previously buggy.