mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-31 20:00:09 +00:00
Fix checking termination of a procedure
This commit is contained in:
+3
-3
@@ -128,14 +128,14 @@ bool check_is_terminating(AstNode *node) {
|
||||
case_end;
|
||||
|
||||
case_ast_node(ws, WhileStmt, node);
|
||||
if (ws->cond == NULL && !check_has_break(ws->body, true)) {
|
||||
return true;
|
||||
if (ws->cond != NULL && !check_has_break(ws->body, true)) {
|
||||
return check_is_terminating(ws->body);
|
||||
}
|
||||
case_end;
|
||||
|
||||
case_ast_node(rs, ForStmt, node);
|
||||
if (!check_has_break(rs->body, true)) {
|
||||
return true;
|
||||
return check_is_terminating(rs->body);
|
||||
}
|
||||
case_end;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user