✓
Passing Passing: the compiler rejects this program as expected.
Code
// PINS: Flow.location on the label-declared flow path (`#lbl capture { … }`)
// names the `#lbl` head line. The capture seed refusal rides flow.location.
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[KORU164]: ~capture seed: field 'p' is bound twice — a field list takes each name once
--> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_259_label_flow_caret_on_head/input.k:7:0Backend must reject with:
CONTAINS error[KORU164]
CONTAINS bound twice
ERROR_AT 7Flows
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