✓
Passing Passing: the compiler rejects this program as expected.
Code
// PINS: a capture seed field whose value is a typed literal `0[i64]` fused
// with the next field refuses with KORU164 naming the missing comma. The
// `]`-closed `0[i64]` is a value annotation, not a type prefix — the
// fusedFieldLine qualifier exemption is for `[`-led and `const`-led tokens.
// Shape: 210_256's capture seed, one comma dropped.
import std/io
pub tor tick { n: i64 }
tick = capture { acc: 0[i64] extra: 0[i64] }
! as st |> captured { acc: st.acc + 1 }
| captured r |> std/io:print.ln("{{ r.acc:d }}")
tick(n: 1)
Actual compiler output
error[KORU164]: ~capture seed: missing comma — 'extra: 0[i64]' began a new field but was read as part of the field above it; separate fields with commas
--> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_287_capture_seed_fused_after_typed_value_refused/input.k:10:0Must fail at runtime with:
CONTAINS error[KORU164]
CONTAINS missing comma
CONTAINS 'extra: 0[i64]'Flows
subflow ~tick click a branch to expand · @labels scroll to their anchor
capture (source: acc: 0[i64] extra: 0[i64])
flow ~tick click a branch to expand · @labels scroll to their anchor
tick (n: 1)
Test Configuration
MUST_ERROR