1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
const U = union { a: void, b: u64, }; comptime { var u: U = .{ .a = {} }; const v = u.b; _ = &u; _ = v; } // error // // :7:16: error: access of union field 'b' while field 'a' is active // :1:11: note: union declared here