✓
Passing This code compiles and runs correctly.
Code
// ============================================================================
// Test 060b: Missing Required Branch
// Tests that flow_checker catches missing required branches
// ============================================================================
// Event with both required and optional branches
~event process { value: u32 }
| success u32 // REQUIRED
| ?warning []const u8 // OPTIONAL
// Proc implementation that can return both branches
~proc process {
if (value > 100) {
return .{ .warning = "Large value" };
}
return .{ .success = value * 2 };
}
// This flow is INVALID - missing required 'success' branch!
~process(value: 10)
| warning |> _ // Only handling optional branch
// Missing: | success s |> ...
Test Configuration
Expected Error:
Incomplete branch coverage