✗
Failing This test is currently failing.
Failed: backend-exec
Error Details
output_emitted.zig:151:15: error: unreachable code
Failure Output
🎯 Compiler coordination: Passes: 20 (flow-based: elaborate, analysis, emission)
Error: output_emitted.zig:151:15: error: unreachable code
_ = &result_1;
~~^~~~~~~~~~~
output_emitted.zig:150:13: note: control flow is diverted here
return r;
^~~~~~~~
output_emitted.zig:151:18: error: use of undeclared identifier 'result_1'
_ = &result_1;
^~~~~~~~ Code
// POSITIVE (flipped from negative 2026-07-02, Lars's linear-transfer ruling):
// an owned obligation CAN enter a pure impl through a CONSUMING parameter.
// The decl is the contract — a host proc is TRUSTED to honor it (the escape
// hatch); a pure impl is CHECKED: the obligation enters the body live, threads
// the fold's consume/reissue cycle (330_074's crediting), escapes via the
// issuing output branch, and the caller discharges. One in, threaded, one out.
//
// The OLD reading ("consume discharges at the door, so the body holds
// nothing") made consuming events host-only by construction — repudiated: it
// pinned the checker's missing seeding, not the language. The true linearity
// walls stay red next door: 330_079 (double-consume) / 330_080 (re-feed of a
// consumed binding).
//
// GREEN since the auto-discharge inserter learned to credit back-edge jump
// args (what first read as a "fused walk" was the inserter planting a
// spurious double-free disposal under the @loop jump because it never
// credited jump args against the round event's consuming params — the
// phantom checker was correctly rejecting the bad insertion).
const std = @import("std");
const Handle = struct { n: i32 };
~tor step { h: *Handle<!owned> }
| again *Handle<owned!>
| stop *Handle<owned!>
~proc step|zig {
h.n += 1;
if (h.n < 3) return .{ .again = h };
return .{ .stop = h };
}
~tor done { h: *Handle<!owned> }
~proc done|zig {
std.debug.print("n={}\n", .{h.n});
std.heap.page_allocator.destroy(h);
}
// `spin` tries to take the owned handle as a CONSUMING parameter and feed it to
// the loop seed. The consume discharges `h` at spin's door, so `#loop step(h: h)`
// is handed a value that carries no obligation -> KORU030.
~tor spin { h: *Handle<!owned> } -> *Handle<owned!>
~spin = #loop step(h)
| again v |> @loop(h: v)
| stop r -> r
~tor make {} -> *Handle<owned!>
~proc make|zig {
const h = std.heap.page_allocator.create(Handle) catch unreachable;
h.* = .{ .n = 0 };
return h;
}
~make(): h0 |> spin(h: h0): hf |> done(h: hf)
Expected output
n=3
Flows
subflow ~spin click a branch to expand · @labels scroll to their anchor
#loop step (h)
flow ~make click a branch to expand · @labels scroll to their anchor
make
Test Configuration
MUST_RUN