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