Meg's Mirrors
zig
about
heads
tags
log
tree
search
Search
zig
doc
langref
test_comptime_wrong_union_field_access.zig
pretty
plain
permalink
blame
history
•
11 lines
•
191 B
1
comptime {
2
var f = Foo{ .int = 42 };
3
f.float = 12.34;
4
}
5
6
const Foo = union {
7
float: f32,
8
int: u32,
9
};
10
11
// test_error=access of union field 'float' while field 'int' is active