✓
Passing This code compiles and runs correctly.
Code
// Template engine: `{% if %}/{% else %}` — an absent variable takes the else
// branch. Pins `{% else %}` support (liquid has if/endif; else is the piece to
// verify is wired). The metaprogramming story leans on else for the
// "branch present? lower it : comp error" shape.
~import std/io
~pub tor pick { }
~[template]proc pick|zig {
{% if missing %}
@import("std").debug.print("has-missing\n", .{});
{% else %}
@import("std").debug.print("no-missing\n", .{});
{% endif %}
}
// JS sibling — pins `{% else %}` on the JS target too. The absent-variable
// reading that selects the else arm is the engine's, not the host's, so a
// divergence between these two variants could only be a host-text bug.
// `console.log` supplies the trailing newline.
~[template]proc pick|js {
{% if missing %}
console.log("has-missing");
{% else %}
console.log("no-missing");
{% endif %}
}
~pick()
Actual
no-missing
Expected output
no-missing
Flows
flow ~pick click a branch to expand · @labels scroll to their anchor
pick
Test Configuration
MUST_RUN