?
Unknown Status unknown.
Code
// 695_010 — `order:` names a column that does not exist on the store.
// The sweep would sift by a field it cannot read, so the create refuses at
// declaration time with the column named in the diagnostic.
import std/io
import std/store
[tree]std/store:new(tree, capacity: 64) { val: i64, ord: i64 }
std/store:insert(tree) { val: 10, ord: 1 }
std/store:preorder(tree, order: "rank")
! preorder e |> std/io:print.ln("{{ e.val:d }}")
Actual compiler output
error[KORU161]: std/store:preorder(tree): `order:` names unknown column 'rank' - 'tree' has no such field (the ordering column is declared in the store's seed block)
--> tests/regression/600_STDLIB/695_STORE_TREE/695_010_order_names_unknown_column_refused/input.k:11:0
error[KORU161]: std/store:insert: unknown store 'tree' - no std/store:new(tree) found
--> tests/regression/600_STDLIB/695_STORE_TREE/695_010_order_names_unknown_column_refused/input.k:9:0
error[KORU161]: std/store:preorder(tree): unknown store - no std/store:new(tree) found (preorder walks a [tree] container store)
--> tests/regression/600_STDLIB/695_STORE_TREE/695_010_order_names_unknown_column_refused/input.k:11:0Must contain:
`order:` names unknown column 'rank'Flows
flow ~new click a branch to expand · @labels scroll to their anchor
new (tree, capacity: 64, source: val: i64, ord: i64)
flow ~insert click a branch to expand · @labels scroll to their anchor
insert (tree, source: val: 10, ord: 1)
flow ~preorder click a branch to expand · @labels scroll to their anchor
preorder (tree, order: "rank")
Test Configuration
MUST_ERROR