#zig build-obj {
--name test -fno-emit-bin
-Mroot=test.zig
#}

#write test.zig {
fn f(b: bool) void {
    const x: i32 = if (b) h: {
        break :h 1;
    };
    _ = x;
}
fn g(b: bool) void {
    const y = if (b) h: {
        break :h @as(i32, 1);
    };
    _ = y;
}
fn h() void {
    // https://github.com/ziglang/zig/issues/12743
    const T = struct { oh_no: *u32 };
    var x: T = if (false) {};
    _ = &x;
}
fn k(b: bool) void {
    // block_ptr case
    const T = struct { oh_no: u32 };
    var x = if (b) blk: {
        break :blk if (false) T{ .oh_no = 2 };
    } else T{ .oh_no = 1 };
    _ = &x;
}
export fn entry() void {
    f(true);
    g(true);
    h();
    k(true);
}
#}
#update
#check errors {
test.zig:2:20: error: expected type 'i32', found 'void'
test.zig:8:15: error: incompatible types: 'i32' and 'void'
test.zig:8:25: note: type 'i32' here
test.zig:16:16: error: expected type 'test.h.T', found 'void'
test.zig:15:15: note: struct declared here
test.zig:22:13: error: incompatible types: 'void' and 'test.k.T'
test.zig:22:25: note: type 'void' here
test.zig:24:13: note: type 'test.k.T' here
#}
