mirror of
https://github.com/ziglang/zig.git
synced 2024-11-28 08:02:32 +00:00
17 lines
282 B
Zig
17 lines
282 B
Zig
const Foo = union {
|
|
Bar: i32,
|
|
Bar: usize,
|
|
};
|
|
export fn entry() void {
|
|
const a: Foo = undefined;
|
|
_ = a;
|
|
}
|
|
|
|
// error
|
|
// backend=stage2
|
|
// target=native
|
|
//
|
|
// :3:5: error: duplicate union field: 'Bar'
|
|
// :2:5: note: other field here
|
|
// :1:13: note: union declared here
|