✓
Passing Passing: the compiler rejects this program as expected.
Code
// PIN — an `Expression` input is a parameter like any other: omit a required
// one and the call is refused.
//
// The twin of 400_183 for the comptime side, and it was MORE silent: an omitted
// required `Expression` param built clean with no Zig error at all, because an
// Expression's value is captured source text rather than a struct field, so
// there is nothing for the host compiler to miss.
//
// `expr` is exempt from nothing here — it is required (400_187 pins that it
// cannot be optional) and it is filled by the first positional. `suffix` is an
// ordinary named parameter that happens to carry an expression, and must be
// labelled.
~import std/io
~[expand]pub tor shout { expr: Expression, suffix: Expression }
~[template]proc shout|zig {
{{ expr }}
}
~shout("hi")
Actual compiler output
error[KORU080]: 'shout' requires input 'suffix' — it is declared with no default and no `?`, and this call does not supply it
--> tests/regression/400_RUNTIME_FEATURES/400_184_reject_omitted_required_expression_param/input.kz:21:0
❌ Compiler coordination error: Auto-discharge failed (multiple disposal options or no disposal event)
(set KORU_BACKEND_TRACE=1 for the backend return trace)Must fail at runtime:
Program must error when executed.
Error output must contain
requires input 'suffix'Flows
flow ~shout click a branch to expand · @labels scroll to their anchor
shout (expr: "hi")
Test Configuration
MUST_ERROR