082 element obligation move in for

✓ Passing This code compiles and runs correctly.

Code

input.kz

Must contain:

Cannot discharge outer-scope resource

Error Verification

Actual Compiler Output

error[KORU032]: Cannot discharge outer-scope resource 'h0' inside @scope boundary. Handle outside the scope or escape via branch constructor.
  --> auto_discharge:55:0

❌ Compiler coordination error: Auto-discharge failed (multiple disposal options or no disposal event)
error: CompilerCoordinationFailed
/Users/larsde/src/koru/tests/regression/300_ADVANCED_FEATURES/330_PHANTOM_TYPES/330_082_element_obligation_move_in_for/backend.zig:94:13: 0x1007eb20b in emit (backend)
            return error.CompilerCoordinationFailed;
            ^
/Users/larsde/src/koru/tests/regression/300_ADVANCED_FEATURES/330_PHANTOM_TYPES/330_082_element_obligation_move_in_for/backend.zig:190:28: 0x1007ebef7 in main (backend)
    const generated_code = try RuntimeEmitter.emit(compile_allocator, final_ast);
                           ^

Flows

flow ~make click a branch to expand · @labels scroll to their anchor
make

Test Configuration

MUST_FAIL