✗
Failing This test is currently failing.
Failed: backend-exec
Error Details
output_emitted.zig:44:21: error: switch on type '[]const u8'
Failure Output
Showing last 10 of 11 lines
Error: output_emitted.zig:44:21: error: switch on type '[]const u8'
switch (result) {
^~~~~~
referenced by:
flow0: output_emitted.zig:118:105
main: output_emitted.zig:677:22
4 reference(s) hidden; use '-freference-trace=6' to see all references
output_emitted.zig:65:36: error: type '[]const u8' does not support struct initialization syntax
return .{ .upped = up };
^~ Code
// EXPLICIT PIN (Lars 2026-06-13): a SUBFLOW call inside an effect branch is
// legal and exercised on its own — the ! line handler invokes a subflow
// (which itself dispatches a branched event) and handles its terminal.
// Inline lowering must keep subflow invocation + branch dispatch working
// from inside a spliced handler body.
import std/io
import std/fs
pub event shout { s: []const u8 } -> []const u8
shout = upper-stub(s)
| upped u -> u
pub event upper-stub { s: []const u8 } -> []const u8
capture { seen: 0[i64] }
! as acc |> std/fs:read-lines(path: "tests/regression/600_STDLIB/650_FS/650_006_subflow_in_effect_branch/input.txt")
! line l |> shout(s: l)
| shouted u |> captured { seen: acc.seen + 1 } |> std/io:print.ln("shout: {{ u:s }}")
| done _ |> _
| failed e |> std/io:print.ln("FAILED {{ e:s }}")
| captured total |> std/io:print.ln("{{ total.seen:d }} lines")
Expected output
shout: FIRST
shout: SECOND
2 lines
Test Configuration
MUST_RUN