✓
Passing Passing: the compiler rejects this program as expected.
Code
// std/rings — one ring holds one element shape. A second named entry
// isn't an element, it's a second lane — and the refusal says so by
// name: more than one kind is a channel.
import std/rings
std/rings:new(q, capacity: 4) { a: u64, b: u64 }
Actual compiler output
error[KORU161]: std/rings:new(q): a ring holds ONE element shape — more than one named lane is a channel: `std/channel:new(q, capacity: 4) { kind: Proto }`
--> tests/regression/300_ADVANCED_FEATURES/320_STDLIB/320_106_rings_two_elements_refused/input.k:6:0Compiler must reject:
Compilation must fail with a diagnostic.
Flows
flow ~new click a branch to expand · @labels scroll to their anchor
new (q, capacity: 4, source: a: u64, b: u64)
Test Configuration
MUST_ERROR