✓
Passing Passing: the compiler rejects this program as expected.
Code
// PINS: a step annotation is only kept on invocation and label steps — on any
// other step kind the peel path frees it without a diagnostic. `[with]` on a
// branch-body `_` terminal vanishes in silence: an annotation the author
// wrote and the compiler swallowed. Refuse annotations on step kinds that
// cannot carry them.
import app/probe
app/probe:probe(msg: "x")
| ok _ |> [with]_
| err _ |> _
Supporting Files
// Branched tor so the input can hang a branch body.
pub tor probe { msg: string }
| ok string
| err string
probe => ok msg
Actual compiler output
error[PARSE003]: annotation '[with]' has nothing to attach to — a step annotation only applies to an invocation
--> tests/regression/600_STDLIB/641_PARSER/641_019_with_on_non_invocation_step_refused/input.k:10:1
|
10 | | err _ |> _
| ^Frontend must reject with:
CONTAINS annotationTest Configuration
MUST_ERROR
koru.json:
{
"paths": {
"app": "."
}
}