✓
Passing Passing: the compiler rejects this program as expected.
Code
// PINS: a destructure entry's prefix annotation is a request, and every
// consumer must honor or refuse it — never silently ignore it. The
// generic emit path implements no annotation, so `{ [row]name }` on a
// plain branch refuses KORU175 at the arm line. The same annotation is
// honored where a consumer implements it: std/store's query arm owns
// [row]/[ordinal]/[id] (690_069).
~import std/io
~tor fetch { id: i64 }
| found { name: string, age: i64 }
| missing
~proc fetch|zig {
if (id == 1) return .{ .found = .{ .name = "lars", .age = 44 } };
return .{ .missing = .{} };
}
~fetch(id: 1)
| found { [row]name } |> std/io:print.ln("{{ name:s }}")
| missing |> std/io:print.ln("nope")
Actual compiler output
error[KORU175]: destructure annotation '[row]' on 'name' has no consumer here — annotations are requests a transform implements; nothing on this path reads them
--> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_271_destructure_annotation_no_consumer/input.kz:19:0
hint: drop the annotation, or put the destructure on a consumer that implements it (std/store's query arm owns [row]/[ordinal]/[id])
❌ Compiler coordination error: Flow validation failed
(set KORU_BACKEND_TRACE=1 for the backend return trace)Compiler must reject:
Compilation must fail with a diagnostic.
Flows
flow ~fetch click a branch to expand · @labels scroll to their anchor
fetch (id: 1)
Test Configuration
MUST_ERROR