✗
Failing This test is currently failing.
Failed: frontend
Failure Output
error[KORU010]: '_' is only legal as the body of a branch handler
--> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_032_implicit_source_param/input.kz:24:0
|
24 | } -> _ |> _
| ^
hint: '_' has meaning only as `| branch [binding] |> _`. Outside a branch handler body — top-level void chain, split-pipeline tail — `|> _` is meaningless. Code
// Test 618: Explicit Source Parameter
// First validate that explicit source: { } syntax works
// TODO: Test implicit syntax after this works
// Validates that Source parameters work like Source with implicit parameter name
~import std/io
~[comptime|transform]tor capture.source {
source: Source,
item: *const Item
} -> Item
~proc capture.source|zig {
// For MVP: Just return the item unchanged to prove transform machinery works
// TODO: Actually transform the source into inline code
return item.*;
}
// Use explicit source parameter
// The transform replaces this entire flow with a new AST node
~capture.source {
const x = 42;
const y = x + 1;
} -> _ |> _