mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
4b89c7bd55
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.
7 lines
157 B
JavaScript
7 lines
157 B
JavaScript
(() => {
|
|
while (true) { break; }
|
|
while (true) { continue; }
|
|
outer: while (true) { break outer; }
|
|
outer: while (true) { continue outer; }
|
|
});
|