✓
Passing This code compiles and runs correctly.
Code
// PINS: an omitted optional parameter inside a tor's IMPL FLOW fills with
// null, the same as at top level. Both calls below omit `scale` — the
// top-level one always worked; the one inside `announce`'s impl flow is the
// pinned path. See lib/maker.kz.
import std/io
import app/lib/maker
tor announce {}
announce = app/lib/maker:make(tag: 4): v |> std/io:print.ln("impl {{ v:d }}")
app/lib/maker:make(tag: 2): w |> std/io:print.ln("top {{ w:d }}")
announce()
Actual
top 20
impl 40
Expected output
top 20
impl 40
Flows
subflow ~announce click a branch to expand · @labels scroll to their anchor
make (tag: 4)
flow ~make click a branch to expand · @labels scroll to their anchor
make (tag: 2)
flow ~announce click a branch to expand · @labels scroll to their anchor
announce
Imported Files
// A tor with an optional parameter (`scale: ?i64`), for 400_180: the
// OPTIONAL PARAMETER INJECTION rule (omitted `?T` fills with null) must
// hold on EVERY emission path. The top-level path (emitArgs) always had it;
// the subflow/impl-flow raw handler-call writer emitted `.{ }` verbatim —
// 'error: missing struct field: scale' — until the twin injection landed.
//
// Found in koru-examples/kopium: `koru/curl:multi.new()` (allocator
// omitted, exactly as downloads.k spells it at top level) inside a
// `tor stream` impl flow. Reproduced here with no curl.
const std = @import("std");
~pub tor make { tag: i64, scale: ?i64 } -> i64
~proc make|zig {
const s: i64 = scale orelse 10;
return tag * s;
}
Test Configuration
MUST_RUN