diff options
Diffstat (limited to 'test/behavior/error.zig')
| -rw-r--r-- | test/behavior/error.zig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/behavior/error.zig b/test/behavior/error.zig index 11146ac9ca..3030ea67ed 100644 --- a/test/behavior/error.zig +++ b/test/behavior/error.zig @@ -251,6 +251,13 @@ fn testErrToIntWithOnePossibleValue( } } +test "inferred empty error set comptime catch" { + const S = struct { + fn foo() !void {} + }; + S.foo() catch @compileError("fail"); +} + test "error union peer type resolution" { if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
