✓
Passing Passing: the compiler rejects this program as expected.
Code
// dispose must resolve the binding's node kind — a binding that never
// carried `*X<...>` for a registered node refuses (KORU184), never
// silently free()s the wrong shape.
import std/tree
import std/io
std/tree:node(Node) { item: i64 }
std/io:read.ln(): l |> std/tree:dispose(l): _ |> std/io:print.ln("x")
Actual compiler output
error[KORU184]: std/tree:dispose(l): can't resolve which node kind 'l' is — bind it from a std/tree:mint, a tor returning *X<owned!>, or declare the parameter `*X<...>` for a node-registered X
--> tests/regression/600_STDLIB/682_TREE/682_007_dispose_unresolvable_binding/input.k:10:1Must contain:
KORU184Flows
flow ~node click a branch to expand · @labels scroll to their anchor
node (Node, source: item: i64)
flow ~read.ln click a branch to expand · @labels scroll to their anchor
read.ln
Test Configuration
MUST_ERROR