✓
Passing This code compiles and runs correctly.
Code
~import "$app/bad_subflow"
~app.bad_subflow:bad_subflow()
Error Verification
Expected Error Pattern
This test must fail because bad_subflow opens a file with cleanup obligation
but returns without documenting the obligation in its return signature.
The obligation is lost at the flow boundary.Actual Compiler Output
🎯 Compiler coordination: Passes: 13 (flow-based: frontend, analysis, emission)
Error: output_emitted.zig:32:28: error: use of undeclared identifier '__inline_flow_1'
return __inline_flow_1(.{ });
^~~~~~~~~~~~~~~Imported Files
~import "$app/fs"
// BAD: Opens file but doesn't document obligation in signature
~pub event bad_subflow {}
~proc bad_subflow {
~app.fs:open(path: "data.txt")
| opened f |> done {}
// ERROR: f.file has [opened!] obligation
// but 'done' branch has no [!] in signature
// Obligation is lost!
}
const std = @import("std");
const File = struct { handle: i32 };
~pub event open { path: []const u8 }
| opened *File[opened!]
~proc open {
std.debug.print("Opening file: {s}\n", .{path});
const allocator = std.heap.page_allocator;
const f = allocator.create(File) catch unreachable;
f.* = File{ .handle = 42 };
return .{ .opened = f };
}
Test Configuration
MUST_FAIL