mirror of
https://github.com/ziglang/zig.git
synced 2025-12-31 10:33:19 +00:00
And fix test cases to make them pass. This is in preparation for starting to pass behavior tests with self-hosted.
13 lines
399 B
Zig
13 lines
399 B
Zig
const io = @import("std").io;
|
|
|
|
pub fn write(_: void, bytes: []const u8) !usize {
|
|
return 0;
|
|
}
|
|
pub fn writer() io.Writer(void, @typeInfo(@typeInfo(@TypeOf(write)).Fn.return_type.?).ErrorUnion.error_set, write) {
|
|
return io.Writer(void, @typeInfo(@typeInfo(@TypeOf(write)).Fn.return_type.?).ErrorUnion.error_set, write){ .context = {} };
|
|
}
|
|
|
|
test "crash" {
|
|
_ = io.multiWriter(.{writer()});
|
|
}
|