zig/test/behavior/bugs/5487.zig
Andrew Kelley 4307436b99 move behavior tests from test/stage1/ to test/
And fix test cases to make them pass. This is in preparation for
starting to pass behavior tests with self-hosted.
2021-04-29 15:54:04 -07:00

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()});
}