✓
Passing Passing: the compiler rejects this program as expected.
Code
// std/rings — ops are name-addressed: the ring word must name a ring
// this program declared. An undeclared name refuses and points at the
// declaration.
import std/rings
std/rings:enqueue(nope, v: 1)
| ok |> _
| full |> _
Actual compiler output
error[KORU161]: std/rings:enqueue: no ring named 'nope' — declare it `std/rings:new(nope, capacity: N) { value: Type }` above this use
--> tests/regression/300_ADVANCED_FEATURES/320_STDLIB/320_107_rings_undeclared_name/input.k:6:0Compiler must reject:
Compilation must fail with a diagnostic.
Flows
flow ~enqueue click a branch to expand · @labels scroll to their anchor
enqueue (nope, v: 1)
Test Configuration
MUST_ERROR