Files
oxc-project__oxc/tasks/coverage/misc/fail/arrow-function-jumps.js
camc314 4b89c7bd55 fix(semantic): reject jumps across arrow functions (#26357)
Reject labeled and unlabeled `break` and `continue` statements that cross an arrow-function boundary.

For example:
```ts
while (true) {
  (() => {
    break;
  });
}
```

now reports an illegal break, while jumps targeting loops inside the arrow remain valid.
2026-09-06 07:44:47 +00:00

8 lines
183 B
JavaScript

while (true) { (() => { break; }); }
outer: while (true) { (() => { break outer; }); }
while (true) { (() => { continue; }); }
outer: while (true) { (() => { continue outer; }); }