✓
Passing This code compiles and runs correctly.
Code
// ============================================================================
// VERIFIED REGRESSION TEST - DO NOT MODIFY WITHOUT DISCUSSION
// ============================================================================
// Test: Flow-based subflow calling another event
// Feature: ~event_name = other_event(args) | branch |> result { fields }
// Verifies: Subflow can invoke events and map their outputs
// ============================================================================
const std = @import("std");
~import std/io
// Helper event: doubles a number
~tor double { value: i32 } -> i32
~proc double|zig {
return value * 2;
}
// Event to test
~tor process { input: i32 } -> i32
// Subflow: calls double and maps its output
~process = double(value: input): r -> r
// Helper to print i32
~tor print-result { value: i32 }
~proc print-result|zig {
std.debug.print("{}\n", .{value});
}
// Test: 21 * 2 = 42
~process(input: 21): f |> print-result(value: f)Actual
42
Expected output
42Flows
subflow ~process click a branch to expand · @labels scroll to their anchor
double (value: input)
flow ~process click a branch to expand · @labels scroll to their anchor
process (input: 21)
Test Configuration
MUST_RUN