feat(normalization): Phase 142 P0 - Loop statement-level normalization
Phase 142-loopstmt P0: Statement-level normalization 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@ -651,10 +651,13 @@ pub(super) fn merge_and_rewrite(
|
||||
}
|
||||
|
||||
// Phase 33-20: Also set latch incoming for other carriers from exit_bindings
|
||||
// Phase 176-4 FIX: exit_bindings may include the loop variable itself
|
||||
// We need to skip it since it's already handled above via boundary.loop_var_name
|
||||
// The remaining non-loop-variable carriers are ordered to match args[1..] (after the loop variable)
|
||||
let mut carrier_arg_idx = 1; // Start from args[1] (args[0] is loop variable)
|
||||
//
|
||||
// args layout depends on whether we have a dedicated loop variable:
|
||||
// - loop_var_name = Some(..): args[0] is the loop variable, args[1..] are other carriers
|
||||
// - loop_var_name = None: args[0..] are carriers (no reserved loop-var slot)
|
||||
//
|
||||
// Phase 176-4 FIX: exit_bindings may include the loop variable itself; skip it when loop_var_name is set.
|
||||
let mut carrier_arg_idx = if b.loop_var_name.is_some() { 1 } else { 0 };
|
||||
for binding in b.exit_bindings.iter() {
|
||||
// Skip if this binding is for the loop variable (already handled)
|
||||
if let Some(ref loop_var) = b.loop_var_name {
|
||||
|
||||
Reference in New Issue
Block a user