✓
Passing Passing: the compiler rejects this program as expected.
Code
// A join's `! step` must name a declared `-> i32` unit — the pump composes
// compile-time-known verbs. A store that never declared `! step` exposes no
// `<store>-step` unit, so joining on one refuses: the pump would have
// nothing to call on its pass.
import std/io
import std/store
import std/pump
std/store:new(pool, capacity: 4) { hp: i64 }
std/pump:create(main)
| drained |> std/io:print.ln("done")
std/pump(main)
! step |> pool-step()
! live |> pool-live()
std/pump:run(main)
Actual compiler output
error[KORU161]: std/pump(main): `! step`'s body must end in a call to a declared tor - the pump composes compile-time-known verbs
--> tests/regression/600_STDLIB/690_STORE/690_311_pump_names_only_step_stores/input.k:14:0Must contain:
must end in a call to a declared torFlows
flow ~new click a branch to expand · @labels scroll to their anchor
new (pool, capacity: 4, source: hp: i64)
flow ~create click a branch to expand · @labels scroll to their anchor
create (expr: main)
flow ~std/pump click a branch to expand · @labels scroll to their anchor
std/pump (main)
flow ~run click a branch to expand · @labels scroll to their anchor
run (expr: main)
Test Configuration
MUST_ERROR