aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/duplicate_enum_field.zig
blob: f357e5544fea8bd064aad258e17e392238db1dcb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
const Foo = enum {
    Bar,
    Bar,
};

export fn entry() void {
    const a: Foo = undefined;
    _ = a;
}

// error
//
// :2:5: error: duplicate enum member name 'Bar'
// :3:5: note: duplicate name here
// :1:13: note: enum declared here