040 for inside if

✓ Passing This code compiles and runs correctly.

Code

// Test: for inside if - depth-first transform ordering
// Inner for should transform before outer if

~import "$std/control"

const std = @import("std");

~event start {}

~proc start {
}

// If contains for loop
// Both should transform to native Zig constructs
~start() |> if(true)
| then |> for(&[_]i32{1, 2, 3})
    | each |> _
    | done |> _
| else |> _
input.kz

Test Configuration

MUST_RUN