mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 16:04:59 +00:00
LibJS: break or continue with nonexistent label is a syntax error
This commit is contained in:
parent
67f2301150
commit
e8da5f99b1
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