✓
Passing Passing: the compiler rejects this program as expected.
Code
// PINS: `koruc explain` reports a REFUSED index declaration with the
// transform's own wording. `std/indexes:store(players)` names no column —
// the declaration refuses at compile (same wall 690_329 pins), and the
// explainer's `status` row carries the identical refusal text rather than
// guessing a plan. The report for a refusing program is the diagnostic
// verbatim: one string, two sinks.
import std/store
import std/indexes
import std/io
import std/explain
std/store:new(players, capacity: 8) { key: i64 }
std/indexes:store(players)
std/io:print.ln("unreachable")
Actual compiler output
error[KORU161]: std/indexes:store(players): the declaration names no column - an index keys on one column of the store: std/indexes:store(players, <col>)
--> tests/regression/600_STDLIB/690_STORE/690_331_explain_reports_index_plan_refused/input.k:14:0Must fail at runtime:
Program must error when executed.
Error output must contain
names no columnFlows
flow ~new click a branch to expand · @labels scroll to their anchor
new (players, capacity: 8, source: key: i64)
flow ~store click a branch to expand · @labels scroll to their anchor
store (expr: players, source: <implicit_source>)
flow ~print.ln click a branch to expand · @labels scroll to their anchor
print.ln (expr: "unreachable")
Test Configuration
MUST_ERROR
Post-validation Script:
#!/bin/bash
# `koruc explain` on a program whose index declaration refuses: the
# `status` row carries the transform's own refusal wording — the same
# "names no column" text the compiler emits — never a guessed index row.
set -e
echo "=== koruc explain (text) on a refusing program ==="
TEXT=$(koruc "$KORU_INPUT" explain 2>&1)
echo "$TEXT"
echo "$TEXT" | grep -q "📖 std/store" || { echo "FAIL: store report missing"; exit 1; }
echo "$TEXT" | grep -q "status = refused:" || { echo "FAIL: refused status missing"; exit 1; }
echo "$TEXT" | grep -q "names no column" || { echo "FAIL: refusal wording drifted"; exit 1; }
echo "=== PASS: explain reports the refused index declaration ==="