Goal
Add iterable for loops after existing conditional and infinite-loop foundation.
Already delivered
Conditional for condition { ... } parsing, checking, CFG, MIR, and backend lowering.
Infinite for { ... } form.
Break and continue control-flow support.
Remaining scope
Add direct iteration over fixed arrays, dynamic arrays, and slice views.
Define binding forms for value-only and index-plus-value iteration.
Preserve copy-versus-borrow rules for move-only elements; do not extract move-only elements by indexed value access.
Define iterator protocol only after optional narrowing in Add optional narrowing and payload access #28 makes a next -> ?T contract usable.
Avoid dynamic dispatch for statically known arrays and slices.
Allow dynamic dispatch only when source is already interface or dynamic.
Dependencies
Validation
Parser, typechecker, ownership, HIR, CFG, MIR, and backend tests.
Positive x_test fixtures for fixed arrays, dynamic arrays, slice views, index-value bindings, and infinite loops.
Negative fixtures for invalid sources, mutation conflicts, and move-only extraction.
Runtime cleanup tests for break, continue, return, and temporary iterable owners.
Goal
Add iterable
forloops after existing conditional and infinite-loop foundation.Already delivered
for condition { ... }parsing, checking, CFG, MIR, and backend lowering.for { ... }form.Remaining scope
next -> ?Tcontract usable.Dependencies
Validation
x_testfixtures for fixed arrays, dynamic arrays, slice views, index-value bindings, and infinite loops.