✓
Passing This code compiles and runs correctly.
Code
// Test: Pattern branch syntax baseline
// Just verify we can define and call an event that returns a struct payload
~import std/io
const std = @import("std");
// Request type
pub const Request = struct {
method: []const u8,
path: []const u8,
};
// Event returns a request
~pub tor incoming {} -> Request
~proc incoming|zig {
return .{ .method = "GET", .path = "/users/42" };
}
// Call it
~incoming(): _ |> std/io:print.ln("got request")
Actual
got request
Expected output
got request
Flows
flow ~incoming click a branch to expand · @labels scroll to their anchor
incoming
Test Configuration
MUST_RUN