✗
Failing This test is currently failing.
Failed: frontend
Failure Output
error[KORU118]: 'File' is call-site syntax — it produces no runtime value and cannot appear in a return or resume type
--> tests/regression/300_ADVANCED_FEATURES/330_PHANTOM_TYPES/920_multiple_errors/input.kz:3:1
|
3 | };
| ^
hint: capture kinds (Expression, Source, File, EmbedFile, InvocationMeta) exist only as tor parameters; produce a runtime type instead Code
pub const File = struct {
handle: usize,
};
~tor open-file { path: string } -> *File<open>
~tor close-file { file: *File<closed> }
~tor read-file { file: *File<open> }
~tor write-file { file: *File<open> }
~proc open-file|zig {
const f = File{ .handle = 42 };
return &f;
}
~proc close-file|zig {
_ = file;
return .{ .done = .{} };
}
~proc read-file|zig {
_ = file;
}
~proc write-file|zig {
_ = file;
return .{ .done = .{} };
}
~open-file(path: "test1.txt"): o |> close-file(o.file)
~open-file(path: "test2.txt"): o |> close-file(o.file)
~open-file(path: "test3.txt"): o |> close-file(o.file)
Actual compiler output
error[KORU118]: 'File' is call-site syntax — it produces no runtime value and cannot appear in a return or resume type
--> tests/regression/300_ADVANCED_FEATURES/330_PHANTOM_TYPES/920_multiple_errors/input.kz:3:1
|
3 | };
| ^
hint: capture kinds (Expression, Source, File, EmbedFile, InvocationMeta) exist only as tor parameters; produce a runtime type insteadMust contain:
Phantom state mismatchFlows
flow ~open-file click a branch to expand · @labels scroll to their anchor
open-file (path: "test1.txt")
flow ~open-file click a branch to expand · @labels scroll to their anchor
open-file (path: "test2.txt")
flow ~open-file click a branch to expand · @labels scroll to their anchor
open-file (path: "test3.txt")
Test Configuration
MUST_ERROR