✓
Passing Passing: the compiler rejects this program as expected.
Code
// PIN — store write blocks reject a redundant `label: label`
// ("punning is mandatory; write `label`"), same law as koru destructures.
import std/string
import std/store
std/store:new(todos, capacity: 4) { label: *std/string:String<std/string:instance!> }
std/string:from-page(text: "hi")
| ok a |> std/string:take(s: a): label |> std/store:insert(todos) { label: label }
| row _ |> _
| err _ |> _
Actual compiler output
error[KORU161]: std/store:insert(todos): punning is mandatory — drop the redundant label and write the bare pun
--> tests/regression/600_STDLIB/690_STORE/690_072_insert_redundant_label_rejected/input.k:7:0Compiler must reject:
Compilation must fail with a diagnostic.
Flows
flow ~new click a branch to expand · @labels scroll to their anchor
new (todos, capacity: 4, source: label: *std/string:String<std/string:instance!>)
flow ~from-page click a branch to expand · @labels scroll to their anchor
from-page (text: "hi")
Test Configuration
MUST_ERROR