✓
Passing Passing: the compiler rejects this program as expected.
Code
// PINS the refusal of `[ann]` after `=` in a subflow impl. Today the bracket
// text falls into the head path and the callee compiles to a tor literally
// named '[with]app.alpha:ping' — a Stage-A annotation leaking into a name,
// reported three stages later as an unknown tor. The annotation position that
// parses is BEFORE the impl name: `[with]start = ...`. Refuse the `=`-position
// spelling at parse with that teaching instead of mangling the callee.
import std/io
import app/alpha
tor start {}
start = [with]app/alpha:ping(msg: "x"): s |> std/io:print.ln("{{ s:s }}")
start()
Supporting Files
// Local vocabulary A — `ping` exists ONLY here.
pub tor ping { msg: string } -> string
ping -> msg
Actual compiler output
error[PARSE003]: annotation '[with]' after '=' attaches to nothing — annotations on a subflow impl go before the name
--> tests/regression/600_STDLIB/641_PARSER/641_018_with_after_equals_mangles_name/input.k:11:9
|
11 | start = [with]app/alpha:ping(msg: "x"): s |> std/io:print.ln("{{ s:s }}")
| ^
hint: write '[with]start = …' — the impl carries the annotation and the head call it names supplies the open vocabularyFrontend must reject with:
CONTAINS annotations on a subflow impl go before the nameTest Configuration
MUST_ERROR
koru.json:
{
"paths": {
"std": "../../../../../koru_std",
"app": "."
}
}