✓
Passing Passing: the compiler rejects this program as expected.
Code
// TEST: record literals in call-arg position reach Zig unlowered — tripwire
//
// `use(p: { x: 10, y: 3 })` emits the literal verbatim —
// `{ x: 10, y: 3 }` — which is Koru record syntax, not Zig; the host dies
// `expected 'while', 'for', 'inline', or '{'`. Bare-return literals DO
// lower (`mk -> { x: 10 }` emits `.{ .x = 10 }`) — the arg-position inline
// path skips that lowering entirely. Not kebab-specific: plain names fail
// identically.
//
// Whether arg literals are intended grammar at all is a language question —
// either way a raw host error is wrong (legal → lower it; illegal → refuse
// in the frontend). Bare BACKEND_COMPILE_ERROR pins the honest failure
// until the call is made (220_051 contract).
import std/io
tor use { p: { x: i64, y: i64 } } -> i64
use -> p.x
use(p: { x: 10, y: 3 }): r |> std/io:print.ln("{{ r:d }}")
Actual compiler output
Error: output_emitted.zig:140:29: error: expected 'while', 'for', 'inline', or '{', found 'a number literal'
break :blk { x: 10, y: 3 }.x;
^~Must fail at backend compile:
Code generation must reject the program.
Error output must contain
error:Flows
flow ~use click a branch to expand · @labels scroll to their anchor
use (p: { x: 10, y: 3 })
Test Configuration
MUST_ERROR