Meg's Mirrors
zig
about
heads
tags
log
tree
search
Search
zig
test
cases
compile_errors
reify_enum_with_duplicate_field.zig
pretty
plain
permalink
blame
history
•
9 lines
•
236 B
1
export fn entry() void {
2
const E = @Enum(u32, .nonexhaustive, &.{ "A", "A" }, &.{ 0, 1 });
3
_ = @as(E, undefined);
4
}
5
6
// error
7
//
8
// :2:42: error: duplicate enum field 'A' at index '1'
9
// :2:42: note: previous field at index '0'