mirror of
https://github.com/ziglang/zig.git
synced 2025-12-10 08:13:07 +00:00
* AstGen: remove the setBlockBodyEliding function. This is no longer needed after 63788b2a511eb87974065a052e2436b0c6202544. * Sema: store_to_block_ptr instruction is handled as store_to_inferred_ptr or store, as necessary.
13 lines
319 B
Zig
13 lines
319 B
Zig
const std = @import("std");
|
|
const builtin = @import("builtin");
|
|
|
|
const Union = union(enum) {
|
|
Text: []const u8,
|
|
Color: u32,
|
|
};
|
|
|
|
test "const error union field alignment" {
|
|
var union_or_err: anyerror!Union = Union{ .Color = 1234 };
|
|
try std.testing.expect((union_or_err catch unreachable).Color == 1234);
|
|
}
|