○
Planned This feature is planned but not yet implemented.
Feature: Transition metatype requires taps.eventToString and taps.branchToString which don't exist yet
Failure Output
error[PARSE001]: invalid flow invocation
--> tests/regression/300_ADVANCED_FEATURES/330_PHANTOM_TYPES/330_011_transition_metatype/input.kz:38:0
|
38 | ~[comptime|runtime]* -> *
| ^ Code
const std = @import("std");
~event hello {}
~event goodbye {}
~[comptime|runtime] event logger { source: []const u8, branch: []const u8, destination: ?[]const u8 }
~proc hello {
std.debug.print("Hello executed\n", .{});
}
~proc goodbye {
std.debug.print("Goodbye executed\n", .{});
}
~[comptime|runtime] proc logger {
if (destination) |dest| {
std.debug.print("Transition: {s}.{s} -> {s}\n", .{source, branch, dest});
} else {
std.debug.print("Transition: {s}.{s} -> terminal\n", .{source, branch});
}
}
~[comptime|runtime]* -> *
| Transition t |> logger(source: taps.eventToString(t.source), branch: taps.branchToString(t.branch), destination: if (t.destination) |d| taps.eventToString(d) else null)
~hello() |> goodbye()Expected
Transition: start.done -> terminal
Hello executed
Transition: hello.done -> goodbye
Goodbye executed
Transition: goodbye.done -> terminal
Transition: end.done -> terminal
Test Configuration
MUST_RUN