✓
Passing This code compiles and runs correctly.
Code
// ============================================================================
// VERIFIED REGRESSION TEST - DO NOT MODIFY WITHOUT DISCUSSION
// ============================================================================
// Test: Subflow with multiple chained continuations
// Feature: ~event = first(...) | b1 |> second(...) | b2 |> third(...) | b3 |> result
// Verifies: Subflows can chain multiple invocations through continuation pipelines
// ============================================================================
const std = @import("std");
~import std/io
// Helper event: triples a number
~tor triple { value: i32 } -> i32
~proc triple|zig {
return value * 3;
}
// Helper event: doubles a number
~tor double { value: i32 } -> i32
~proc double|zig {
return value * 2;
}
// Event to test
~tor process { input: i32 } -> i32
// Multi-continuation subflow: chains triple -> double -> final
~process = triple(value: input): t |> double(value: t): d -> d
// Helper to verify and print the result
~tor verify-and-print { value: i32 }
~proc verify-and-print|zig {
if (value == 30) {
std.debug.print("30\n", .{});
} else {
std.debug.print("ERROR: Expected 30, got {}\n", .{value});
}
}
// Test: 5 * 3 * 2 = 30
~process(input: 5): f |> verify-and-print(value: f)
Actual
30
Expected output
30
Flows
subflow ~process click a branch to expand · @labels scroll to their anchor
triple (value: input)
flow ~process click a branch to expand · @labels scroll to their anchor
process (input: 5)
Test Configuration
MUST_RUN