mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
11 lines
191 B
Zig
11 lines
191 B
Zig
comptime {
|
|
var f = Foo{ .int = 42 };
|
|
f.float = 12.34;
|
|
}
|
|
|
|
const Foo = union {
|
|
float: f32,
|
|
int: u32,
|
|
};
|
|
|
|
// test_error=access of union field 'float' while field 'int' is active
|