✓
Passing This code compiles and runs correctly.
Code
// PIN — a phantom param re-passed inside its own module keeps its
// tracked state. Measured 2026-09-18: it refuses,
// KORU030 expected 'app.m:live' but got 'm:live'
// — the param declaration canonicalizes the state to the file-stem
// name (`m:live`) while the call-site expectation uses the logical
// module name (`app.m:live`). Same `*Handle<live>` spelling in one
// file, two state names.
//
// The union form `<a|b>` and `@label` loop re-entry fail the same root
// (measured: 'expected jev:greedy|jev:chaotic got app.jev:greedy' at
// re-entry vs 'expected app.jev:greedy got jev:greedy' at head calls)
// — the @label case additionally blocks discharge inside its scope, so
// a module-internal judged loop cannot be written at all.
import app/m
app/m:make(): h |> app/m:twice(h) |> app/m:done(h)
Supporting Files
// Library module for 330_134 — a phantom-typed handle with the
// issue/borrow/consume discipline, plus `twice`: a subflow INSIDE the
// module that re-passes its phantom param to a same-module tor.
const std = @import("std");
pub const Handle = struct { n: i32 };
~pub tor make {} -> *Handle<live!>
~proc make|zig {
const h = std.heap.page_allocator.create(Handle) catch unreachable;
h.* = .{ .n = 1 };
return h;
}
~pub tor use { h: *Handle<live> }
~proc use|zig {
std.debug.print("n={d}\n", .{h.n});
}
~pub tor done { h: *Handle<!live> }
~proc done|zig {
std.heap.page_allocator.destroy(h);
}
~pub tor twice { h: *Handle<live> }
~twice = use(h) |> use(h)
Actual
n=1
n=1
Expected output
n=1
n=1
Flows
flow ~make click a branch to expand · @labels scroll to their anchor
make
Test Configuration
MUST_RUN