✓
Passing Passing: the compiler rejects this program as expected.
Code
// PIN — unbound fmt.blk refuses at the transform with KORU180.
//
// `std/fmt:fmt.blk { ... }` with no `: name` bind used to emit the
// `__BlkResult` tagged union (the `return_binding == null` arm in fmt.kz).
// Nothing could consume that union — `| formatted f` was removed from the
// grammar — so the program reached Zig codegen and died on a raw type error
// (`expected '[]const u8', found '__BlkResult'`). That was the 620_006
// class: a raw Zig type leak where a koru diagnostic belongs. The unbound
// arm now refuses upstream with a message naming the `: name` bind; the
// ln transform (koru_std/fmt.lnzig.kz) is the twin.
import std/fmt
import std/io
const {
name: "World"
}
std/fmt:fmt.blk {
Hello, {{ name:s }}!
} |> std/io:print.ln("done")
Actual compiler output
error[KORU180]: std/fmt:fmt.blk: unbound result — bind the formatted string with `: name` (`std/fmt:fmt.blk { ... } : name`); the `| formatted` branch spelling was removed, so an unbound result has no consumer
--> tests/regression/600_STDLIB/620_FMT/620_020_fmt_blk_unbound_result_refuses/input.k:18:1Must fail at runtime with:
CONTAINS KORU180
CONTAINS unboundFlows
flow ~const click a branch to expand · @labels scroll to their anchor
const (source: name: "World")
flow ~fmt.blk click a branch to expand · @labels scroll to their anchor
fmt.blk (source: Hello, {{ name:s }}!)
Test Configuration
MUST_ERROR