blob a762e6e0 (414B) - Raw
1 const assert = @import("std").debug.assert; 2 3 fn foo(id: u64) !i32 { 4 return switch (id) { 5 1 => getErrInt(), 6 2 => { 7 const size = try getErrInt(); 8 return try getErrInt(); 9 }, 10 else => error.ItBroke, 11 }; 12 } 13 14 fn getErrInt() %i32 { return 0; } 15 16 test "ir block deps" { 17 assert((foo(1) catch unreachable) == 0); 18 assert((foo(2) catch unreachable) == 0); 19 }