LibJS: break or continue with nonexistent label is a syntax error

This commit is contained in:
Matthew Olsson
2020-10-08 10:49:08 -07:00
committed by Andreas Kling
parent 67f2301150
commit e8da5f99b1
4 changed files with 32 additions and 5 deletions

View File

@@ -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();
});