✓
Passing Passing: the compiler rejects this program as expected.
Code
// 400_172 — `|` (continuation marker) on an EFFECT branch is a kind error.
// `query` installs a standing rule and fires the effect arm `! query`; it mints
// no matchable outcome event. Writing `| query` is the inverse marker/kind
// mismatch to 400_171 — `!` and `|` are separate kinds, and the marker must
// match the branch's declared kind. koru rejects it in the query transform,
// where the standing-rule branch vocabulary is validated.
import std/io
import std/store
std/store:new(game, capacity: 8) { hp: i64 }
std/store:rule(game)
| row { entity.hp } |> std/io:print.ln("hp {{ hp:d }}")
std/store:insert(game) { hp: 5 }
Actual compiler output
error[KORU161]: std/store:rule(game): continuation marker `|` used where an effect branch is required — `rule` fires the effect arm `! row`, not `| row`
--> tests/regression/400_RUNTIME_FEATURES/400_172_continuation_marker_on_effect_rejected/input.k:10:0
error[KORU161]: std/store:rule(game): unknown store - no std/store:new(game) found (or the store is a capacity-1 value - queries need a container, declare `capacity: N` at create)
--> tests/regression/400_RUNTIME_FEATURES/400_172_continuation_marker_on_effect_rejected/input.k:10:0
error[KORU161]: std/store:insert: unknown store 'game' - no std/store:new(game) found
--> tests/regression/400_RUNTIME_FEATURES/400_172_continuation_marker_on_effect_rejected/input.k:12:0Backend must reject with:
CONTAINS continuation marker `|` used where an effect branch is requiredError output must contain
continuation marker `|` used where an effect branch is required — `query` fires the effect arm `! query`, not `| query`Flows
flow ~new click a branch to expand · @labels scroll to their anchor
new (game, capacity: 8, source: hp: i64)
flow ~rule click a branch to expand · @labels scroll to their anchor
rule (game)
flow ~insert click a branch to expand · @labels scroll to their anchor
insert (game, source: hp: 5)
Test Configuration
MUST_ERROR