✓
Passing Passing: the compiler rejects this program as expected.
Code
// PINS: the standalone `#name` anchor's name is an identifier, nothing else.
// `~#done(r:{a:1})` has no space to split on, so the whole token is the name —
// it is refused at the declaration, not reported later at the jump.
const std = @import("std");
~tor start {}
~proc start|zig {}
~#done(r:{a:1})
~start() |> @done(r: 1)
Actual compiler output
error[PARSE003]: malformed label declaration '#done(r:{a:1})' — a label name is an identifier; arguments belong on the @jump, not the anchor
--> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_300_label_anchor_name_not_identifier/input.kz:9:1
|
9 | ~#done(r:{a:1})
| ^Frontend must reject with:
CONTAINS error[PARSE003]
CONTAINS malformed label declaration
ERROR_AT 9
NOT_CONTAINS output_emitted.zigFlows
flow ~start click a branch to expand · @labels scroll to their anchor
start
Test Configuration
MUST_ERROR