aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/error.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-05-09 01:52:26 -0700
committerAndrew Kelley <andrew@ziglang.org>2024-05-09 01:52:26 -0700
commitbcb534c295d5cc6fd63caa570cc08e6b148a507c (patch)
tree0b17cb1e632d894f50f25e550d5113f232b0e877 /test/behavior/error.zig
parentd9b00ee4ba48717ff6b306a6f9419e7b604ac04b (diff)
parent74f52954b9cb40d59d80b839b45bb859146731a7 (diff)
downloadzig-bcb534c295d5cc6fd63caa570cc08e6b148a507c.tar.gz
zig-bcb534c295d5cc6fd63caa570cc08e6b148a507c.zip
Merge branch 'llvm18'
Upgrades the LLVM, Clang, and LLD dependencies to LLVM 18.x Related to #16270
Diffstat (limited to 'test/behavior/error.zig')
-rw-r--r--test/behavior/error.zig10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/behavior/error.zig b/test/behavior/error.zig
index 408dc96005..7703a02f68 100644
--- a/test/behavior/error.zig
+++ b/test/behavior/error.zig
@@ -1077,3 +1077,13 @@ test "result location initialization of error union with OPV payload" {
_ = &c;
try expectEqual(0, (c catch return error.TestFailed).x);
}
+
+test "return error union with i65" {
+ if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest;
+
+ try expect(try add(1000, 234) == 1234);
+}
+
+fn add(x: i65, y: i65) anyerror!i65 {
+ return x + y;
+}