✓
Passing Passing: the compiler rejects this program as expected.
Code
// std/rings — a ring is sized at the declaration; `new` without
// `capacity:` refuses with teaching.
import std/rings
std/rings:new(q) { value: u64 }
Actual compiler output
error[KORU161]: std/rings:new(q): a ring is sized at the declaration — `capacity: N`, a power of two above zero
--> tests/regression/300_ADVANCED_FEATURES/320_STDLIB/320_104_rings_missing_capacity/input.k:5:0Compiler must reject:
Compilation must fail with a diagnostic.
Flows
flow ~new click a branch to expand · @labels scroll to their anchor
new (q, source: value: u64)
Test Configuration
MUST_ERROR