✓
Passing Passing: the compiler rejects this program as expected.
Code
// std/rings — capacity must be a power of two: the Vyukov ring masks
// with cap-1. A non-power-of-two capacity refuses at the declaration.
import std/rings
std/rings:new(q, capacity: 3) { value: u64 }
Actual compiler output
error[KORU161]: std/rings:new(q): capacity 3 is not a power of two — the Vyukov ring masks by cap-1
--> tests/regression/300_ADVANCED_FEATURES/320_STDLIB/320_105_rings_capacity_not_pow2/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, capacity: 3, source: value: u64)
Test Configuration
MUST_ERROR