266 clear refuses without an aggregate arm

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

Code

input.k

Actual compiler output

error[KORU161]: std/store:clear(rows): this store carries a `! removed` arm and no `! cleared` arm. `clear` does NOT fire `! removed` - firing it once per row is exactly the cost `clear` exists to remove - so declare `! cleared <count>` to say what emptying means for this store's observers, or remove rows with `std/store:take`
  --> tests/regression/600_STDLIB/690_STORE/690_266_clear_refuses_without_an_aggregate_arm/input.k:26:0

Compiler must reject:

Compilation must fail with a diagnostic.

Flows

flow ~new click a branch to expand · @labels scroll to their anchor
new (t, source: n: 0[i64])
flow ~new click a branch to expand · @labels scroll to their anchor
new (rows, capacity: 4, source: v: i64)
flow ~insert click a branch to expand · @labels scroll to their anchor
insert (rows, source: v: 1)
flow ~clear click a branch to expand · @labels scroll to their anchor
clear (rows)
flow ~print.ln click a branch to expand · @labels scroll to their anchor
print.ln (expr: "n {{ t.n:d }}")

Test Configuration

MUST_ERROR