✓
Passing Passing: the compiler rejects this program as expected.
Code
// PINS: Flow.location on the label-declared flow path (`#lbl …`) names the
// `#lbl` head line — the refusal reports there, not at the call's own span.
// The refusing diagnostic changed 2026-10-29: `capture` is
// [keyword|comptime|transform], and a label may only anchor a call that
// exists at runtime, so KORU211 now preempts the KORU164 seed refusal this
// test originally pinned (the unlabeled twin lives at
// 210_256_dup_field_capture_seed_refused).
import std/io
pub tor tick { n: i64 }
#lbl capture { p: 0[i64], p: 0[i64] }
! as st |> captured { p: st.m }
| captured r |> std/io:print.ln("{{ r.p:d }}")
tick(n: 1)
Actual compiler output
error[KORU211]: label '#lbl' anchors 'std.control:capture' — a keyword/comptime/transform call is consumed at compile time, so there is no runtime invocation for '@lbl' to re-dispatch to
--> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_259_label_flow_caret_on_head/input.k:12:1
|
12 | #lbl capture { p: 0[i64], p: 0[i64] }
| ^
hint: a label may only anchor a call that exists at runtime — anchor '#lbl' on a runtime tor invocation insteadFrontend must reject with:
CONTAINS error[KORU211]
ERROR_AT 12Flows
flow ~capture click a branch to expand · @labels scroll to their anchor
#lbl capture (source: p: 0[i64], p: 0[i64])
flow ~tick click a branch to expand · @labels scroll to their anchor
tick (n: 1)
Test Configuration
MUST_ERROR