When migrating a project to Zig 0.14.0-dev, I found that the following code no longer compiles:
const std = @import("std");
pub fn main() !void {
nice(.{ .b = 42 });
}
const A = union(enum) {
field: struct {
b: u32,
},
};
fn nice(data: anytype) void {
const a: A = @unionInit(A, "field", data);
std.debug.print("{}\n", .{a});
}
While this can be easily worked-around, I was wondering if this was a regression or an intended change.