Summary
The body result is popped with _ = self.result_stack.pop() — no safe_pop, no guard. If the loop body is a block that terminates early (return/break) without pushing a value, this raises IndexError and leaks IR state. The ForCountLoopStmt has the same pattern with _body_val.
OS / Environment
Steps to Reproduce
File Upload (optional)
No response
Expected Results
Actual Results
IRx version
Code of Conduct
Summary
The body result is popped with
_ = self.result_stack.pop()— no safe_pop, no guard. If the loop body is a block that terminates early (return/break) without pushing a value, this raises IndexError and leaks IR state. The ForCountLoopStmt has the same pattern with_body_val.OS / Environment
-Steps to Reproduce
File Upload (optional)
No response
Expected Results
Actual Results
-IRx version
-Code of Conduct