✓
Passing Passing: the compiler rejects this program as expected.
Code
// Issuing an obligation on an INPUT (`<owned!>` — only outputs may issue) is
// refused at the `~tor` line of the event whose field carries the illegal
// phantom — the declaration owns the error. Decl locations are stored in user
// coordinates (`getUserDeclStartLocation`; 210_164 pins that for --ast-json)
// while diagnostics store parser coordinates, so the site must translate —
// untranslated, this caret lands on the blank line above the decl, or `:0`
// when the decl is on line 1.
~tor mk { bad: *Handle<owned!> }
~proc mk|zig { _ = bad; }
~tor done { r: *Handle<!owned> }
~proc done|zig { _ = r; }
~mk(bad: undefined): r |> done(r)
Actual compiler output
error[KORU033]: Cannot issue obligation '<owned!>' on input parameter (event: mk). Use '<!owned>' to consume an existing obligation, or remove the '!' suffix.
--> tests/regression/300_ADVANCED_FEATURES/330_PHANTOM_TYPES/330_130_polarity_diagnostic_names_the_tor_decl/input.kz:8:0
❌ Compiler coordination error: Phantom semantic validation failed
(set KORU_BACKEND_TRACE=1 for the backend return trace)Must contain:
KORU033Flows
flow ~mk click a branch to expand · @labels scroll to their anchor
mk (bad: undefined)
Test Configuration
MUST_ERROR