✗
Failing This test is currently failing.
Failed: backend-exec
Error Details
output_emitted.zig:57:9: error: expected 'var' or 'const' before variable declaration
Failure Output
🎯 Compiler coordination: Passes: 17 (flow-based: frontend, analysis, emission)
Error: output_emitted.zig:57:9: error: expected 'var' or 'const' before variable declaration
_: struct { x: i32, y: i32 } = blk: {
^ Code
// Test 210_020: Struct Field Punning
// When field value matches field name, allow shorthand: { x, y } instead of { x: x, y: y }
//
// This is the "punning" pattern common in many languages.
// The emitter should expand { c.ast, c.code } to { ast: c.ast, code: c.code }
~import std/io
~event data { x: i32, y: i32 } -> { x: i32, y: i32 }
// Explicit field names (always works)
~data -> { x, y }
// Test it
~data(x: 10, y: 20): _ |> std/io:print.ln("explicit works")
Expected output
explicit works
Flows
flow ~data click a branch to expand · @labels scroll to their anchor
data (x: 10, y: 20)
Test Configuration
MUST_RUN