✓
Passing This code compiles and runs correctly.
Code
// Test: qualified variant selected at the call site.
//
// ~proc ping|zig — default impl
// ~proc ping|zig(godot) — qualified variant (zig host driving godot path)
//
// The call-site spelling is `f|zig(godot)` with the variant opaque and
// greedy: `|` takes everything up to the next top-level whitespace, and
// whitespace separates the variant from a following arg list:
//
// ping|zig(godot) (x: 41) — qualified variant, spaced args
// ping(x: 41)|zig(godot) — post-paren variant
//
// Both must dispatch to handler__zig_28_godot_29_ and keep the `: bind`.
const std = @import("std");
~import std/io
~tor ping { x: i32 } -> i32
~proc ping|zig {
return x + 1;
}
~proc ping|zig(godot) {
return x + 100;
}
~ping(x: 41): r1 |> std/io:print.ln("bare {{ r1:d }}")
~ping|zig(godot) (x: 41): r2 |> std/io:print.ln("pre {{ r2:d }}")
~ping(x: 41)|zig(godot): r3 |> std/io:print.ln("post {{ r3:d }}")
Actual
bare 42
pre 141
post 141
Expected output
bare 42
pre 141
post 141
Flows
flow ~ping click a branch to expand · @labels scroll to their anchor
ping (x: 41)
flow ~ping click a branch to expand · @labels scroll to their anchor
ping|zig(godot) (x: 41)
flow ~ping click a branch to expand · @labels scroll to their anchor
ping|zig(godot) (x: 41)
Test Configuration
MUST_RUN