SIGN IN SIGN UP

fix(minifier): avoid merging `if` to `for` in sloppy mode when containing function declaration (#25638)

```js
for (var i = 0; i++ < 1;) {
    if (x) break;
    else function f() {}
    f = 0;
}
console.log(typeof f, f);
```
was compressed to
```js
for (var i = 0; i++ < 1 && !x;) {
	function f() {}
	f = 0;
}
console.log(typeof f, f);
```
But this is wrong in sloppy mode. The output changes `number 0` / `undefined undefined` to `function f() {}`.

This PR fixes that.

I used AI to generate the code and then reviewed the code and added tests.
S
sapphi-red committed
6f0c7cf31bb5e26cdd888ddce42c20a59cc9f66b
Parent: 30e612d