036 autodischarge no void candidate

✗ Failing This test is currently failing.

Failed: wrong-error

Error Details

output_emitted.zig:31:51: error: function with non-void return type 'output_emitted.main_module.close_event.Output' implicitly returns

Failure Output

Showing last 10 of 11 lines
Error: output_emitted.zig:31:51: error: function with non-void return type 'output_emitted.main_module.close_event.Output' implicitly returns
        pub fn handler(__koru_event_input: Input) Output {
                                                  ^~~~~~
output_emitted.zig:39:9: note: control flow reaches end of body here
        }
        ^
referenced by:
    flow0: output_emitted.zig:46:57
    main: output_emitted.zig:96:22
    4 reference(s) hidden; use '-freference-trace=6' to see all references

Code

pub const Handle = struct {
    id: i32,
};
~event open {}
| ok *Handle[open!]
~proc open {
    const h = std.heap.page_allocator.create(Handle) catch unreachable;
    h.* = .{ .id = 42 };
    return .{ .ok = h };
}
~event close { h: *Handle[!open] }
| error []const u8
~proc close {
    std.heap.page_allocator.destroy(h);
}
const std = @import("std");
~open()
| ok _ |> _
input.kz

Output must match:

MUST_FAIL
# Should error because no void disposal candidate exists
# Error occurs at backend-exec when auto-discharge finds no valid candidate
CONTAINS Auto-discharge failed

Error Verification

Actual Compiler Output

🎯 Compiler coordination: Passes: 13 (flow-based: frontend, analysis, emission)
Error: output_emitted.zig:31:51: error: function with non-void return type 'output_emitted.main_module.close_event.Output' implicitly returns
        pub fn handler(__koru_event_input: Input) Output {
                                                  ^~~~~~
output_emitted.zig:39:9: note: control flow reaches end of body here
        }
        ^
referenced by:
    flow0: output_emitted.zig:46:57
    main: output_emitted.zig:96:22
    4 reference(s) hidden; use '-freference-trace=6' to see all references

Test Configuration

MUST_FAIL