aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/duplicate_struct_field.zig
blob: bb37178a85063996db0da69eb579b38aad4e4677 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const Foo = struct {
    Bar: i32,
    Bar: usize,
};
export fn entry() void {
    const a: Foo = undefined;
    _ = a;
}

// error
// backend=stage2
// target=native
//
// :3:5: error: duplicate struct field: 'Bar'
// :2:5: note: other field here
// :1:13: note: struct declared here