aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2016-12-10 18:38:53 -0500
committerAndrew Kelley <superjoe30@gmail.com>2016-12-10 18:38:53 -0500
commit6feae8a4e90118df26738316ab1fb49882ba6431 (patch)
tree89c113d87eca49f10681c0b6c18c66f51ff0d6fb /test
parent443e14afbd0615bd4902e53a31f70550a8d4497e (diff)
downloadzig-6feae8a4e90118df26738316ab1fb49882ba6431.tar.gz
zig-6feae8a4e90118df26738316ab1fb49882ba6431.zip
IR: support error union type
Diffstat (limited to 'test')
-rw-r--r--test/self_hosted2.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/self_hosted2.zig b/test/self_hosted2.zig
index a1f4aa2a14..7b37601fce 100644
--- a/test/self_hosted2.zig
+++ b/test/self_hosted2.zig
@@ -267,6 +267,12 @@ fn testErrorName() {
assert(memeql(@errorName(error.ItBroke), "ItBroke"));
}
+//error One;
+//fn getAnErrorValue (b: bool) -> %i32 {
+// const result = if (b) error.One else i32(1234);
+// return result;
+//}
+
fn assert(ok: bool) {
if (!ok)
@unreachable();