Merge pull request #3217 from ksss/break

Fix unexpected behavior with break
This commit is contained in:
Yukihiro "Matz" Matsumoto
2016-09-27 10:31:48 +09:00
committed by GitHub
+3
View File
@@ -2852,6 +2852,9 @@ loop_break(codegen_scope *s, node *tree)
loop->pc3 = tmp;
}
else {
if (!tree) {
genop(s, MKOP_A(OP_LOADNIL, cursp()));
}
genop(s, MKOP_AB(OP_RETURN, cursp(), OP_R_BREAK));
}
}