✗
Failing This test is currently failing.
Failed: frontend
Failure Output
Showing last 10 of 11 lines
--> tests/regression/300_ADVANCED_FEATURES/330_PHANTOM_TYPES/910_phantom_state_valid/input.kz:2:1
|
2 | ~tor open-file {}
| ^
error[PARSE003]: single continuation branch 'closed' carrying a payload is a one-variant tag union — declare the single output as a bare return instead: `-> <type>`
--> tests/regression/300_ADVANCED_FEATURES/330_PHANTOM_TYPES/910_phantom_state_valid/input.kz:10:1
|
10 | ~tor close-file { file: *std.fs.File<open> }
| ^ Code
const std = @import("std");
~tor open-file {}
| opened *std.fs.File<open>
~proc open-file|zig {
std.debug.print("File opened\n", .{});
const allocator = std.heap.page_allocator;
const f = allocator.create(std.fs.File) catch unreachable;
return .{ .opened = f };
}
~tor close-file { file: *std.fs.File<open> }
| closed *std.fs.File<closed>
~proc close-file|zig {
std.debug.print("File closed\n", .{});
return .{ .closed = file };
}
~open-file()
| opened o |> close-file(file: o)
| closed _ |> _
Expected output
File opened
File closed
Flows
flow ~open-file click a branch to expand · @labels scroll to their anchor
open-file
Test Configuration
MUST_RUN