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

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

// error
// backend=stage2
// target=native
//
// :3:5: error: duplicate enum field 'Bar'
// :2:5: note: other field here