✗
Failing This test is currently failing.
Failed: no-error-pin
Error Details
output_emitted.zig:68:60: error: expected ',' after initializer
Failure Output
🎯 Compiler coordination: Passes: 20 (flow-based: elaborate, analysis, emission)
Error: output_emitted.zig:68:60: error: expected ',' after initializer
_ = koru_std.koru_io.print_ln_event.handler(.{ .@""done"" = "done" });
^~~~ Code
// Test: Branch with payload requires binding or explicit discard
//
// When a branch has a payload (e.g., `result { value: i32 }`), the branch
// handler MUST either bind it or explicitly discard with `_`:
//
// | result r |> // LEGAL - binds payload to 'r'
// | result _ |> // LEGAL - explicitly discards payload
// | result |> // ILLEGAL - payload exists but no binding
//
// This test verifies the compiler catches the illegal case.
const std = @import("std");
~tor compute { x: i32 } -> i32
~proc compute|zig {
return x * 2;
}
// BUG: This should be a compile error!
// The `result` branch has payload `{ value: i32 }` but no binding.
// Correct syntax would be: `| result _ |>` or `| result r |>` (if `r` is used)
~compute(x: 42)
| result |> std/io:print.ln("done")
Flows
flow ~compute click a branch to expand · @labels scroll to their anchor
compute (x: 42)
Test Configuration
Expected Error:
branch 'result' has payload but no binding