✓
Passing This code compiles and runs correctly.
Code
// PINS: a continuation destructure is a binding list — each name binds
// once. `| found { name, name }` refuses PARSE010 at the branch line,
// in the frontend, before any Zig is emitted. Same law as PARSE010's
// field lists (210_247); `_` discards are exempt and may repeat
// (320_145).
~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 { name, name } |> std/io:print.ln("{{ name:s }}")
| missing |> std/io:print.ln("nope")
Frontend must reject with:
CONTAINS error[PARSE010]
CONTAINS 'name'
CONTAINS bound twice
ERROR_AT 18
NOT_CONTAINS output_emitted.zigFlows
flow ~fetch click a branch to expand · @labels scroll to their anchor
fetch (id: 1)