208 head effect arm tor param scope

✓ Passing Passing: the compiler rejects this program as expected.

Code

input.k

Actual compiler output

error[KORU207]: `! piece` at the head of 'render's implementation references 'tag' — a head-position `!` arm lowers to a context-free fn that sees module scope only, so the implementing tor's params do not cross
  --> tests/regression/400_RUNTIME_FEATURES/400_208_head_effect_arm_tor_param_scope/input.k:20:0
    |
 20 | ! piece p |> std/io:print.ln(tag) |> std/io:print.ln(p)
    | ^
  hint: stage 'tag' in a store and read it inside the arm, or move the call off the head — a mid-chain `!` arm inlines and keeps the enclosing scope

Frontend must reject with:

CONTAINS error[KORU207]
CONTAINS context-free
NOT_CONTAINS output_emitted.zig

Flows

subflow ~render click a branch to expand · @labels scroll to their anchor
split (s: t, sep: "|")
flow ~render click a branch to expand · @labels scroll to their anchor
render (t: "a|b", tag: "x:")

Test Configuration

MUST_ERROR LANGUAGES: zig cs