✓
Passing Passing: the compiler rejects this program as expected.
Code
// A required edge (`left: Node`, no `?`) is never null — optionality is what
// `?` spells (KORU184).
import std/tree
std/tree:node(Node) { item: i64, left: Node }
std/tree:mint(Node) { item: 1, left: null }: _ -> 0
Actual compiler output
error[KORU184]: std/tree:mint(Node): edge 'left' is declared required (`left: Node`, no `?`) — a null child is what `?Node` spells
--> tests/regression/600_STDLIB/682_TREE/682_006_mint_null_required_edge/input.k:8:1Must contain:
KORU184Flows
flow ~node click a branch to expand · @labels scroll to their anchor
node (Node, source: item: i64, left: Node)
flow ~mint click a branch to expand · @labels scroll to their anchor
mint (Node, source: item: 1, left: null)
Test Configuration
MUST_ERROR