✓
Passing This code compiles and runs correctly.
Code
pub const Handle = struct {
id: i32,
};
~tor open {} -> *Handle<open!>
~proc open|zig {
std.debug.print("opened\n", .{});
const h = std.heap.page_allocator.create(Handle) catch unreachable;
h.* = .{ .id = 42 };
return h;
}
~tor close-quiet { h: *Handle<!open> }
~proc close-quiet|zig {
std.debug.print("closed quietly\n", .{});
std.heap.page_allocator.destroy(h);
}
~tor close-checked { h: *Handle<!open> } -> string
~proc close-checked|zig {
std.heap.page_allocator.destroy(h);
}
const std = @import("std");
~open()
Actual
opened
closed quietly
Must compile:
Runtime output is not checked.
Expected output
opened
closed quietly
Flows
flow ~open click a branch to expand · @labels scroll to their anchor
open
Test Configuration
MUST_RUN