✓
Passing Passing: the compiler rejects this program as expected.
Code
// 696_002 — std/ctx: a param no enclosing scope provides refuses through the
// ordinary missing-input diagnostic — injection adds no new error path.
//
// PINS the tail of the precedence chain: explicit arg > innermost ctx >
// outward ctx > declared default > ordinary missing-param refusal. ctx(inner)
// provides `a` only; `b` and `c` are required (no default, no `?`), so the
// shape checker refuses them exactly as it would without any ctx.
import std/io
import std/store
import std/ctx
std/store:new(inner) { a: 9[i64] }
pub tor ctxprobe { a: i64, b: i64, c: i64 }
ctxprobe = std/io:print.ln("unreached")
std/io:print.ln("seed")
|> std/ctx(inner) |> ctxprobe()
Actual compiler output
error[KORU080]: 'ctxprobe' requires input 'b' — it is declared with no default and no `?`, and this call does not supply it
--> tests/regression/600_STDLIB/696_CTX/696_002_ctx_unfilled_refusal/input.k:19:0
error[KORU080]: 'ctxprobe' requires input 'c' — it is declared with no default and no `?`, and this call does not supply it
--> tests/regression/600_STDLIB/696_CTX/696_002_ctx_unfilled_refusal/input.k:19:0Compiler must reject:
Compilation must fail with a diagnostic.
Flows
flow ~new click a branch to expand · @labels scroll to their anchor
new (inner, source: a: 9[i64])
subflow ~ctxprobe click a branch to expand · @labels scroll to their anchor
print.ln (expr: "unreached")
flow ~print.ln click a branch to expand · @labels scroll to their anchor
print.ln (expr: "seed")
Test Configuration
MUST_ERROR