✓
Passing This code compiles and runs correctly.
Code
// PINS: an omitted optional parameter whose declared name is kebab-case
// emits the mangled field name in the null injection — `.pitch_offset =
// null`, not `.pitch-offset = null` (a Zig syntax error). Both call paths
// omit `pitch-offset`: the top-level emitArgs path and the impl-flow raw
// handler-call path — plus an explicit kebab arg as the control.
import std/io
import app/lib/box
tor announce {}
announce = app/lib/box:thing(gain: 1.0): v |> std/io:print.ln("impl {{ v:f }}")
app/lib/box:thing(gain: 2.0): w |> std/io:print.ln("top {{ w:f }}")
app/lib/box:thing(gain: 3.0, pitch-offset: 7.0): x |> std/io:print.ln("expl {{ x:f }}")
announce()
Supporting Files
// OPTIONAL PARAMETER INJECTION must emit the mangled spelling for kebab
// declared names — the injection sites wrote `field.name` verbatim, so an
// omitted `pitch-offset: ?f64` emitted `.pitch-offset = null` ('expected
// field initializer'). Explicit kebab args always mangled correctly via
// writeBranchName; the injection now uses the same helper.
//
// Found by a commissioned cell in intranquil-domain: WO-002's
// `brush.apply(brush, peak, pitch-offset)` omitted `pitch-offset` at a .k
// call site and hit the unemitted name. Three `= null` injection sites
// shared the defect (emitArgs + the two impl-flow twins).
const std = @import("std");
~pub tor thing { gain: f64, pitch-offset: ?f64 } -> f64
~proc thing|zig {
const off: f64 = pitch_offset orelse -1;
return gain + off;
}
Actual
top 1
expl 10
impl 0
Expected output
top 1
expl 10
impl 0
Flows
subflow ~announce click a branch to expand · @labels scroll to their anchor
thing (gain: 1.0)
flow ~thing click a branch to expand · @labels scroll to their anchor
thing (gain: 2.0)
flow ~thing click a branch to expand · @labels scroll to their anchor
thing (gain: 3.0, pitch-offset: 7.0)
flow ~announce click a branch to expand · @labels scroll to their anchor
announce
Test Configuration
MUST_RUN