✓
Passing This code compiles and runs correctly.
Code
// Template engine: `{{ arg }}` substitution in a |template| proc body.
// Baseline — confirms per-call templates route through the Liquid engine and
// interpolate invocation args. Anchors the cluster.
~import std/io
~pub tor show { n: usize }
~[template]proc show|zig {
@import("std").debug.print("n={{ n }}\n", .{});
}
// JS sibling — same pin (`{{ arg }}` reaches the Liquid engine and interpolates
// the captured invocation arg), lowered to the JS host. The body is JS because a
// per-call template is spliced at the call site BEFORE the emitter picks a
// target, so the variant is chosen by build language and each variant emits its
// own host text. Divergence: `console.log` appends the newline the Zig format
// string carries explicitly, so `\n` is dropped here rather than escaped.
~[template]proc show|js {
console.log("n={{ n }}");
}
~show(n: 42)
Actual
n=42
Expected output
n=42
Flows
flow ~show click a branch to expand · @labels scroll to their anchor
show (n: 42)
Test Configuration
MUST_RUN