Files
liuxingbaoyuandGitHub f431e0cc85 Fix hoisting of function declarations in loops and switch (#17691)
* fix

* fix switch

* Revert "Fix order of `transform-block-scoped-functions` in `preset-env` (#16475)"

This reverts commit 15a3342b39.

* clean

* fix test

* use enter

* fix
2026-01-23 18:36:41 +01:00

20 lines
353 B
JavaScript

foo.func1 = function () {
if (cond1) {
var _loop = function () {
if (cond2) {
func2 = function () {};
func3 = function () {};
func4(function () {
func2();
});
return 1; // break
}
},
func2,
func3;
for (;;) {
if (_loop()) break;
}
}
};