is this filed already?
pub fn main() void {
const item: U = blk: {
var t: usize = 0;
_ = &t;
if (t == 100) {
break :blk .{ .a = 12345 };
}
};
std.log.info("{}", .{item});
}
const U = struct { a: u32 = 0 };
output:
% zig run src/main.zig
info: main.U{ .a = 16777216 }
changing the if statement to
if (false) {
break :blk .{ .a = 12345 };
}
outputs:
% zig run src/main.zig
src/main.zig:12:26: error: comptime dereference requires 'main.U' to have a well-defined layout
std.log.info("{}", .{item});
^~~~
src/main.zig:15:11: note: struct declared here
const U = struct { a: u32 = 0 };
^~~~~~~~~~~~~~~~~~~~~
this reproduces on master, 0.13.0, 0.12.0, am i missing something?