raise the error at runtime; fix #3152

This commit is contained in:
cremno
2016-05-09 16:57:56 +02:00
parent b4e1889813
commit 309791b3ae
+2 -1
View File
@@ -2801,7 +2801,8 @@ loop_break(codegen_scope *s, node *tree)
loop = loop->prev;
}
if (!loop) {
codegen_error(s, "unexpected break");
raise_error(s, "unexpected break");
return;
}
if (loop->type == LOOP_NORMAL) {