✓
Passing Passing: the compiler rejects this program as expected.
Code
// PINS: a label declaration carries no argument list. `@done(r: {...})` reads
// the whole tail as the label's NAME — minting a label no `@name` jump can
// spell — so the declaration is refused as malformed rather than registered.
import std/io
@done(r: {a: 1, a: 2})
Actual compiler output
error[PARSE003]: malformed label declaration '@done(r: {a: 1, a: 2})' — a label name is an identifier; arguments belong on the @jump, not the declaration
--> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_298_label_decl_args_not_a_name/input.k:6:1
|
6 | @done(r: {a: 1, a: 2})
| ^Frontend must reject with:
CONTAINS error[PARSE003]
CONTAINS malformed label declaration
ERROR_AT 6
NOT_CONTAINS output_emitted.zigTest Configuration
MUST_ERROR