114 const field missing comma refused

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

Code

input.k

Actual compiler output

error[KORU176]: missing comma — 'b: @as(i32, 2)' began a new field but was read as part of the field above it; separate fields with commas
  --> tests/regression/300_ADVANCED_FEATURES/320_STDLIB/320_114_const_field_missing_comma_refused/input.k:8:0

Must fail at runtime with:

CONTAINS error[KORU176]
CONTAINS missing comma
CONTAINS 'b: @as(i32, 2)'
ERROR_AT 8
NOT_CONTAINS output_emitted.zig

Flows

flow ~const click a branch to expand · @labels scroll to their anchor
const (source: a: @as(i32, 5) b: @as(i32, 2))
flow ~print.ln click a branch to expand · @labels scroll to their anchor
print.ln (expr: "unreachable")

Test Configuration

MUST_ERROR