aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/reify_enum_with_duplicate_field.zig
blob: 77bfe56f17b5c910d0817d000426e5d32bdd218b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
export fn entry() void {
    _ = @Type(.{
        .@"enum" = .{
            .tag_type = u32,
            .fields = &.{
                .{ .name = "A", .value = 0 },
                .{ .name = "A", .value = 1 },
            },
            .decls = &.{},
            .is_exhaustive = false,
        },
    });
}

// error
//
// :2:9: error: duplicate enum field 'A'
// :2:9: note: other field here