✓
Passing This code compiles and runs correctly.
Code
// ============================================================================
// Test 507: Meta-event taps (koru:start and koru:end)
// ============================================================================
// Tests that synthesized meta-events can be tapped for program lifecycle
// observation. The compiler injects koru:start at program begin and koru:end
// at program end.
~import std/io
~import std/taps
// Simple event to prove main program runs
~event greet { name: []const u8 }
~proc greet|zig {
std.debug.print("Hello, {s}!\n", .{name});
}
const std = @import("std");
// Tap program start - match the `done` branch explicitly
~tap(koru:start -> *)
| done |> std/io:print.ln("START: Program beginning")
// Tap program end - match the `done` branch explicitly
~tap(koru:end -> *)
| done |> std/io:print.ln("END: Program finishing")
// Main flow
~greet(name: "World")
Actual
START: Program beginning
Hello, World!
END: Program finishing
Expected output
START: Program beginning
Hello, World!
END: Program finishing
Test Configuration
MUST_RUN