delete bad behavior test

behavior tests must not depend on std.io
This commit is contained in:
Andrew Kelley
2025-06-29 19:35:29 -07:00
parent 0e37ff0d59
commit 7eae26d608

View File

@@ -1032,24 +1032,6 @@ test "function called at runtime is properly analyzed for inferred error set" {
};
}
test "generic type constructed from inferred error set of unresolved function" {
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
const S = struct {
fn write(_: void, bytes: []const u8) !usize {
_ = bytes;
return 0;
}
const T = std.io.Writer(void, @typeInfo(@typeInfo(@TypeOf(write)).@"fn".return_type.?).error_union.error_set, write);
fn writer() T {
return .{ .context = {} };
}
};
_ = std.io.multiWriter(.{S.writer()});
}
test "errorCast to adhoc inferred error set" {
const S = struct {
inline fn baz() !i32 {