✓
Passing Passing: the compiler rejects this program as expected.
Code
// `dial = |zig { ... }` in flow-body position parses as a variant-tagged
// invocation with an EMPTY path — nothing to resolve. It used to panic
// upstream in keyword resolution (`path.segments[0]` on len 0); the shape
// checker now refuses first with a diagnostic that names the handler
// spelling (`proc name|zig { ... }`).
import std/io
pub tor dial { port: i64 }
| ok i64
| refused i64
dial = |zig {
_ = port;
return .{ .refused = port };
}
dial(port: 8080)
| ok p |> std/io:print.ln("ok {{ p:d }}")
| refused f |> std/io:print.ln("refused {{ f:d }}")
Actual compiler output
error[KORU040]: a '|zig' block has no event to attach to — the handler spelling is 'proc <name>|zig { ... }'
--> tests/regression/400_RUNTIME_FEATURES/400_196_variant_block_no_event_refuses/input.k:12:0
❌ Compiler coordination error: Unknown tor referenced
(set KORU_BACKEND_TRACE=1 for the backend return trace)Compiler must reject:
Compilation must fail with a diagnostic.
Flows
subflow ~dial click a branch to expand · @labels scroll to their anchor
|zig (source: _ = port;
return .{ .refused = port };)
flow ~dial click a branch to expand · @labels scroll to their anchor
dial (port: 8080)
Test Configuration
MUST_ERROR