| ... | @@ -1032,24 +1032,6 @@ test "function called at runtime is properly analyzed for inferred error set" { | ... | @@ -1032,24 +1032,6 @@ test "function called at runtime is properly analyzed for inferred error set" { |
| 1032 | }; | 1032 | }; |
| 1033 | } | 1033 | } |
| 1034 | | 1034 | |
| 1035 | test "generic type constructed from inferred error set of unresolved function" { | | |
| 1036 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | | |
| 1037 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | | |
| 1038 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | | |
| 1039 | | | |
| 1040 | const S = struct { | | |
| 1041 | fn write(_: void, bytes: []const u8) !usize { | | |
| 1042 | _ = bytes; | | |
| 1043 | return 0; | | |
| 1044 | } | | |
| 1045 | const T = std.io.Writer(void, @typeInfo(@typeInfo(@TypeOf(write)).@"fn".return_type.?).error_union.error_set, write); | | |
| 1046 | fn writer() T { | | |
| 1047 | return .{ .context = {} }; | | |
| 1048 | } | | |
| 1049 | }; | | |
| 1050 | _ = std.io.multiWriter(.{S.writer()}); | | |
| 1051 | } | | |
| 1052 | | | |
| 1053 | test "errorCast to adhoc inferred error set" { | 1035 | test "errorCast to adhoc inferred error set" { |
| 1054 | const S = struct { | 1036 | const S = struct { |
| 1055 | inline fn baz() !i32 { | 1037 | inline fn baz() !i32 { |