✓
Passing Passing: the compiler rejects this program as expected.
Code
// std/channel — capacity is a named declaration argument, required. A
// channel is sized at the declaration; omitting `capacity:` refuses with
// the shape.
import std/proto
import std/channel
std/proto(Reading) {
id: u64
}
std/channel:new(inbox) { reading: Reading }
Actual compiler output
error[KORU161]: std/channel:new(inbox): a channel is sized at the declaration — `capacity: N`, a power of two above zero
--> tests/regression/600_STDLIB/699_CHANNEL/699_018_missing_capacity_refused/input.k:11:0Compiler must reject:
Compilation must fail with a diagnostic.
Flows
flow ~std/proto click a branch to expand · @labels scroll to their anchor
std/proto (Reading, source: id: u64)
flow ~new click a branch to expand · @labels scroll to their anchor
new (expr: inbox, source: reading: Reading)
Test Configuration
MUST_ERROR