| 1 | const Foo = struct { |
| 2 | Bar: i32, |
| 3 | Bar: usize, |
| 4 | }; |
| 5 | |
| 6 | const S = struct { |
| 7 | a: u32, |
| 8 | b: u32, |
| 9 | a: u32, |
| 10 | a: u64, |
| 11 | }; |
| 12 | |
| 13 | export fn a() void { |
| 14 | const f: Foo = undefined; |
| 15 | _ = f; |
| 16 | } |
| 17 | |
| 18 | export fn b() void { |
| 19 | const s: S = undefined; |
| 20 | _ = s; |
| 21 | } |
| 22 | |
| 23 | // error |
| 24 | // |
| 25 | // :2:5: error: duplicate struct member name 'Bar' |
| 26 | // :3:5: note: duplicate name here |
| 27 | // :1:13: note: struct declared here |
| 28 | // :7:5: error: duplicate struct member name 'a' |
| 29 | // :9:5: note: duplicate name here |
| 30 | // :10:5: note: duplicate name here |
| 31 | // :6:11: note: struct declared here |