✓
Passing Passing: the compiler rejects this program as expected.
Code
// PINS: a record literal carried by a label-jump argument —
// `@loop(n: { a: 1 b: c })` — refuses PARSE003 naming the fused field.
// Jump args bind like call args; the record literal they carry is the same
// `{ name: value }` list struct_literal parses.
const std = @import("std");
~tor counter { n: i32 }
| next i32
| done i32
~proc counter|zig {
if (n < 5) { return .{ .next = n + 1 }; }
return .{ .done = n };
}
~tor start {}
~proc start|zig {}
~start() |> #loop counter(n: 1)
| next c |> @loop(n: { a: 1 b: c })
| done |> _
Actual compiler output
error[PARSE003]: malformed record value `{ a: 1 b: c }` in the jump arguments — missing comma — 'b: c' began a new field but was read as part of the field above it; separate fields with commas
--> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_294_label_jump_arg_fused_record_refused/input.kz:20:0
|
20 | | next c |> @loop(n: { a: 1 b: c })
| ^Frontend must reject with:
CONTAINS error[PARSE003]
CONTAINS missing comma
CONTAINS 'b: c'
ERROR_AT 20
NOT_CONTAINS output_emitted.zigFlows
flow ~start click a branch to expand · @labels scroll to their anchor
start
Test Configuration
MUST_ERROR