aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/union_auto-enum_value_already_taken.zig
blob: 214fd1bdacd8144e9323c7b451d050c4cec3844f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const MultipleChoice = union(enum(u32)) {
    A = 20,
    B = 40,
    C = 60,
    D = 1000,
    E = 60,
};
export fn entry() void {
    const x: MultipleChoice = .{ .C = {} };
    _ = x;
}

// error
//
// :6:9: error: enum tag value 60 already taken
// :4:9: note: other occurrence here