248 rule refuses ordinal by name

✓ Passing Passing: the compiler rejects this program as expected.

Code

input.k

Actual compiler output

error[KORU161]: std/store:rule(units): `[ordinal]` on 'n' - a rule arm has a row and no traversal, so there is no position in a walk to name (this is not unimplemented; it is meaningless here). `[ordinal]` is a sweep request: `! query { [row]r, [ordinal]n }`
  --> tests/regression/600_STDLIB/690_STORE/690_248_rule_refuses_ordinal_by_name/input.k:28:0

error[KORU161]: std/store:rule(units): unknown store - no std/store:new(units) found (or the store is a capacity-1 value - queries need a container, declare `capacity: N` at create)
  --> tests/regression/600_STDLIB/690_STORE/690_248_rule_refuses_ordinal_by_name/input.k:28:0

error[KORU161]: std/store:insert: unknown store 'units' - no std/store:new(units) found
  --> tests/regression/600_STDLIB/690_STORE/690_248_rule_refuses_ordinal_by_name/input.k:31:0

Compiler must reject:

Compilation must fail with a diagnostic.

Flows

flow ~new click a branch to expand · @labels scroll to their anchor
new (units, capacity: 64, source: hp: i64)
flow ~rule click a branch to expand · @labels scroll to their anchor
rule (units)
flow ~insert click a branch to expand · @labels scroll to their anchor
insert (units, source: hp: 10)

Test Configuration

MUST_ERROR