○
Planned This feature is planned but not yet implemented.
Feature: Phantom state mismatch detection
Code
const std = @import("std");
~tor open-file {} -> *std.fs.File[open]
~proc open-file|zig {
const allocator = std.heap.page_allocator;
const f = allocator.create(std.fs.File) catch unreachable;
return f;
}
~tor close-file { file: *std.fs.File[closed] }
~proc close-file|zig {
}
~open-file(): o |> close-file(o.file)
Must fail at frontend compile:
Parsing or type-checking must reject the program.
Flows
flow ~open-file click a branch to expand · @labels scroll to their anchor
open-file