✗
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/330_028_ambiguous_without_default/input.kz:3:1
|
3 | const File = struct { handle: i32 };
| ^
hint: capture kinds (Expression, Source, File, EmbedFile, InvocationMeta) exist only as tor parameters; produce a runtime type instead Code
~import std/io
const std = @import("std");
const File = struct { handle: i32 };
~tor open { path: string } -> *File<opened!>
~proc open|zig {
const f = std.heap.page_allocator.create(File) catch unreachable;
f.* = File{ .handle = 42 };
return f;
}
~tor close { file: *File<!opened> }
~proc close|zig {
std.heap.page_allocator.destroy(file);
}
~tor flush-close { file: *File<!opened> }
~proc flush-close|zig {
std.heap.page_allocator.destroy(file);
}
~open(path: "test.txt")
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/330_028_ambiguous_without_default/input.kz:3:1
|
3 | const File = struct { handle: i32 };
| ^
hint: capture kinds (Expression, Source, File, EmbedFile, InvocationMeta) exist only as tor parameters; produce a runtime type insteadMust contain:
multiple discharge optionsFlows
flow ~open click a branch to expand · @labels scroll to their anchor
open (path: "test.txt")
Test Configuration
MUST_ERROR