✓
Passing Passing: the compiler rejects this program as expected.
Code
// ASPIRATIONAL — a `[with(...)]` argument names a module this file IMPORTED:
// the annotation abbreviates a declared dependency, it does not create one.
// app/ghost is never imported, so the annotation must refuse with a diagnostic
// that names the module as written — otherwise a flow annotation would quietly
// smuggle file-scope resolution in, which is the import machinery's job.
import std/io
tor start {}
[with(app/ghost)]start = haunt(): h |> std/io:print.ln("{{ h:s }}")
start()
Actual compiler output
error[KORU142]: [with] module 'app/ghost' is not imported — the annotation abbreviates a dependency this file declares; write 'import app/ghost' to declare it
--> tests/regression/600_STDLIB/641_PARSER/641_017_with_arg_requires_import/input.k:10:0
❌ Compiler coordination error: error[KORU142]: [with] module 'app/ghost' is not imported — the annotation abbreviates a dependency this file declares; write 'import app/ghost' to declare it
(set KORU_BACKEND_TRACE=1 for the backend return trace)Must fail at runtime with:
CONTAINS 'app/ghost' is not importedFlows
subflow ~start click a branch to expand · @labels scroll to their anchor
haunt
flow ~start click a branch to expand · @labels scroll to their anchor
start
Test Configuration
MUST_ERROR
koru.json:
{
"paths": {
"std": "../../../../../koru_std",
"app": "."
}
}