mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-28 20:29:42 +00:00
LibJS: break or continue with nonexistent label is a syntax error
This commit is contained in:
committed by
Andreas Kling
parent
67f2301150
commit
e8da5f99b1
@@ -37,3 +37,11 @@ test("labeled for loop with continue", () => {
|
||||
}
|
||||
expect(counter).toBe(6);
|
||||
});
|
||||
|
||||
test("invalid label across scope", () => {
|
||||
expect(`
|
||||
label: {
|
||||
(() => { break label; });
|
||||
}
|
||||
`).not.toEval();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user