289 bare return nameless field refused

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

Code

input.k

Actual compiler output

error[PARSE003]: malformed record value `{ a: 1, : 2 }` in the bare return — field has no name — a field is `name: value` or a bare punnable name; `: value` dropped the name
  --> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_289_bare_return_nameless_field_refused/input.k:8:0
    |
  8 | f -> { a: 1, : 2 }
    | ^

Frontend must reject with:

CONTAINS error[PARSE003]
CONTAINS field has no name
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