✗
Failing This test is currently failing.
Failed: backend-exec
Error Details
output_emitted.zig:41:13: error: variant subflow body has continuations/preamble — emission path not yet implemented
Failure Output
🎯 Compiler coordination: Passes: 14 (flow-based: frontend, analysis, emission)
Error: output_emitted.zig:41:13: error: variant subflow body has continuations/preamble — emission path not yet implemented
@compileError("variant subflow body has continuations/preamble — emission path not yet implemented");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
referenced by:
flow0: output_emitted.zig:100:62
main: output_emitted.zig:532:22
4 reference(s) hidden; use '-freference-trace=6' to see all references Code
// Test 8215: Subflow variant with continuations.
//
// Shape: `~event|variant = invocation(args) | branch binding |> result_constructor`
// Combines the variant-arm declaration (new, established by 8213/8214) with
// the subflow-with-continuations shape from 302_subflow_flow (grounded passing test).
//
// Currently expected to trip the @compileError marker in visitor_emitter.zig
// because the variant emission loop only handles continuations.len == 0.
~import std/io
~import std/build
const std = @import("std");
~event greet { value: i32 }
| final i32
// Two helper events with proc bodies, copied from 302_subflow_flow.
~event double { value: i32 }
| result i32
~proc double|zig {
return .{ .result = value * 2 };
}
~event identity { value: i32 }
| result i32
~proc identity|zig {
return .{ .result = value };
}
// Default unvariant arm — passes value through.
~greet = identity(value)
| result r => final r
// Variant arm — doubles. Same shape as the default arm but |two-tagged.
~greet|two = double(value)
| result r => final r
// Register the |two variant.
~std/build:variants {
"input:greet": "two"
}
| configured _ |> _
| skipped _ |> _
| invalid-event _ |> _
~event print-result { value: i32 }
~proc print-result|zig {
std.debug.print("{}\n", .{value});
}
// Expected: greet(value: 21) picks |two variant → double(21) → 42 → print 42.
~greet(value: 21)
| final f |> print-result(value: f)
Expected output
42
Test Configuration
MUST_RUN