✓
Passing This code compiles and runs correctly.
Code
// ============================================================================
// Test 210_082: MUST_ERROR — bare `!* |> _` effect residual is
// pay-for-nothing and must be parser-rejected.
//
// Symmetric with 210_081 for effect branches. Without `!*`, unhandled
// optional effect branches compile-time-elide (handler not installed in
// comptime struct → call lowers to nothing). With `!* |> _`, the consumer
// asks for unhandled effects to route into a no-op handler — runtime cost
// for zero information.
//
// Engagement rule applies identically to `!*` and `|*`: residual requires
// real work in the body, optionally informed by a metatype binding.
//
// Expected: parser rejects `!* |> _` with a message pointing at the
// residual line and explaining the no-engagement rule.
// ============================================================================
~pub tor tokenize { source: string }
! token string
! ?warning string
! ?debug string
| done usize
~pub tor consume-token { t: string }
~pub tor end-run { n: usize }
~tokenize(source: "x")
! token t |> consume-token(t)
!* |> _
| done n |> end-run(n)
Must fail at frontend compile:
Parsing or type-checking must reject the program.
Expected patterns
Each line is a regex that must match the program output.
error\[KORU026\]
pay-for-nothing residual
!\* \|> _