379 index decl names no store refused

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

Code

input.k

Actual compiler output

error[KORU161]: std/indexes:ordered(ghost, key): 'ghost' is not a declared store — an index keys one container's rows; declare `std/store:new(ghost, capacity: N)` first or fix the name
  --> tests/regression/600_STDLIB/690_STORE/690_379_index_decl_names_no_store_refused/input.k:12:1

error[KORU161]: std/store:insert: unknown store 'players' - no std/store:new(players) found
  --> tests/regression/600_STDLIB/690_STORE/690_379_index_decl_names_no_store_refused/input.k:14:1

Must fail at runtime with:

ERROR_AT 12

Error output must contain

is not a declared store

Flows

flow ~new click a branch to expand · @labels scroll to their anchor
new (players, capacity: 8, source: key: i64)
flow ~ordered click a branch to expand · @labels scroll to their anchor
ordered (expr: ghost, key, source: <implicit_source>)
flow ~insert click a branch to expand · @labels scroll to their anchor
insert (players, source: key: 1)

Test Configuration

MUST_ERROR LANGUAGES: zig