✓
Passing Passing: the compiler rejects this program as expected.
Code
// PINS: the thread's ambiguity refusal cannot be dissolved by a scope
// binding. 210_180 pins `merge`-shaped callees — two unfilled same-type
// params — as KORU093 with an empty scope. The same program WITH a compatible
// binding in scope must still refuse: the fill pass may complete calls, but
// it may not preempt the thread's candidacy — `o` answering `a` and `b` here
// would silently discard the produce AND hide the election the author needed
// to make. Both slots belong to the thread's election first.
import std/io
tor other {} -> string
proc other|zig { return "other"; }
tor produce {} -> string
proc produce|zig { return "made"; }
tor consume { a: string, b: string }
proc consume|zig { }
other(): o |> produce() |> consume()
Actual compiler output
error[KORU093]: 'consume' has 2 unfilled parameters accepting a string: 'a', 'b' — the thread cannot elect between them
--> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_321_thread_ambiguity_not_dissolved_by_scope/input.k:19:0
|
19 | other(): o |> produce() |> consume()
| ^
hint: write one of them at the call site; the thread fills whichever is left open (writing narrows, and what you write binds by name)
error[KORU092]: the string produced by 'produce' has nowhere to land — every parameter downstream that could take it is already written
--> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_321_thread_ambiguity_not_dissolved_by_scope/input.k:19:0
|
19 | other(): o |> produce() |> consume()
| ^
hint: leave the slot that should take it unfilled so the thread elects it, or drop the value at its source with `: _`. An unnamed produce cannot be referenced; `|>` forwards it or refuses.Must fail at frontend compile:
Parsing or type-checking must reject the program.
Error output must contain
KORU093Flows
flow ~other click a branch to expand · @labels scroll to their anchor
other
Test Configuration
MUST_ERROR LANGUAGES: zig