master
 1const builtin = @import("builtin");
 2const expect = @import("std").testing.expect;
 3
 4fn foo(id: u64) !i32 {
 5    return switch (id) {
 6        1 => getErrInt(),
 7        2 => {
 8            const size = try getErrInt();
 9            _ = size;
10            return try getErrInt();
11        },
12        else => error.ItBroke,
13    };
14}
15
16fn getErrInt() anyerror!i32 {
17    return 0;
18}
19
20test "ir block deps" {
21    if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
22    if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
23
24    try expect((foo(1) catch unreachable) == 0);
25    try expect((foo(2) catch unreachable) == 0);
26}