mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +00:00
backend=auto (now the default if backend is omitted) means to let the compiler pick whatever backend it wants as the default. This is important for platforms where we don't yet have a self-hosted backend, such as loongarch64. Also purge a bunch of redundant target=native.
32 lines
546 B
Zig
32 lines
546 B
Zig
const Foo = struct {
|
|
Bar: i32,
|
|
Bar: usize,
|
|
};
|
|
|
|
const S = struct {
|
|
a: u32,
|
|
b: u32,
|
|
a: u32,
|
|
a: u64,
|
|
};
|
|
|
|
export fn a() void {
|
|
const f: Foo = undefined;
|
|
_ = f;
|
|
}
|
|
|
|
export fn b() void {
|
|
const s: S = undefined;
|
|
_ = s;
|
|
}
|
|
|
|
// error
|
|
//
|
|
// :2:5: error: duplicate struct member name 'Bar'
|
|
// :3:5: note: duplicate name here
|
|
// :1:13: note: struct declared here
|
|
// :7:5: error: duplicate struct member name 'a'
|
|
// :9:5: note: duplicate name here
|
|
// :10:5: note: duplicate name here
|
|
// :6:11: note: struct declared here
|