mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-28 15:28:55 +00:00
LibJS: break or continue with nonexistent label is a syntax error
This commit is contained in:
parent
67f2301150
commit
e8da5f99b1
Notes:
sideshowbarker
2024-07-19 01:57:20 +09:00
Author: https://github.com/mattco98
Commit: e8da5f99b1
Pull-request: https://github.com/SerenityOS/serenity/pull/3724
Issue: https://github.com/SerenityOS/serenity/issues/3714
Reviewed-by: https://github.com/linusg
4 changed files with 32 additions and 5 deletions
|
@ -2,8 +2,7 @@ test("'break' syntax errors", () => {
|
|||
expect("break").not.toEval();
|
||||
expect("break label").not.toEval();
|
||||
expect("{ break }").not.toEval();
|
||||
// FIXME: Parser does not throw error on nonexistent label
|
||||
// expect("{ break label }.not.toEval();
|
||||
expect("{ break label }").not.toEval();
|
||||
expect("label: { break label }").toEval();
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue