✗
Failing This test is currently failing.
Failed: backend-exec
Error Details
output_emitted.zig:94:30: error: expected expression, found 'invalid token'
Failure Output
🎯 Compiler coordination: Passes: 20 (flow-based: elaborate, analysis, emission)
Error: output_emitted.zig:94:30: error: expected expression, found 'invalid token'
std.mem.sort(@TypeOf(${expr}[0]), ${expr}, {}, std.sort.asc(@TypeOf(${expr}[0])));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Code
// PIN (aspirational) — `std/array:sort` lowers and sorts.
//
// The slot rename that makes this test WRITEABLE landed with it: the tor
// declared `arr: Expression`, and only a parameter named `expr` receives the
// bare first positional, so `sort(xs)` could never have filled it. Renamed to
// `expr` (Lars's ruling), which is necessary and not sufficient.
//
// It still does not lower, and the reason is one layer down: `std/array` is the
// ONLY consumer of `std/template:define`'s `${...}` interpolation, nothing in
// the corpus exercises either, and the `${expr}` markers reach the generated
// Zig verbatim — `error: expected expression, found 'invalid token'`.
//
// So the whole library is unwitnessed surface that has never worked. Zero call
// sites in the corpus, in koru_std, or anywhere on disk (measured 2026-08-02),
// which is exactly why ten months passed without anyone finding out. Left RED
// on purpose rather than deleted: the decision between repairing
// `std/template:define` and retiring both is Lars's, and a red on the board is
// how it stays askable.
const std = @import("std");
~import std/io
~import std/array
var xs = [_]i32{ 3, 1, 2 };
~std/array:sort(xs[0..])
~std/io:print.ln("{{ xs[0]:d }} {{ xs[1]:d }} {{ xs[2]:d }}")
Expected output
1 2 3
Flows
flow ~sort click a branch to expand · @labels scroll to their anchor
sort (expr: xs[0..])
flow ~print.ln click a branch to expand · @labels scroll to their anchor
print.ln (expr: "{{ xs[0]:d }} {{ xs[1]:d }} {{ xs[2]:d }}")
Test Configuration
MUST_RUN