293 bare return redundant label refused

✓ Passing Passing: the compiler rejects this program as expected.

Code

input.k

Actual compiler output

error[PARSE005]: redundant explicit label 'a:' in the bare return — punning is mandatory
  --> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_293_bare_return_redundant_label_refused/input.k:8:0
    |
  8 | f -> { a: a, z: 1 }
    | ^
  hint: drop the label: write the bare pun instead

Frontend must reject with:

CONTAINS error[PARSE005]
CONTAINS redundant explicit label
ERROR_AT 8
NOT_CONTAINS output_emitted.zig

Flows

flow ~f click a branch to expand · @labels scroll to their anchor
f (a: 4)

Test Configuration

MUST_ERROR