| 1 | #update=initial version |
| 2 | #file=main.zig |
| 3 | pub fn main() void { |
| 4 | _ = @as(S, undefined); |
| 5 | } |
| 6 | // To reproduce the original bug, the inner struct must perform a namespace lookup |
| 7 | // or a scope lookup when resolving its field type. |
| 8 | const SomeType = u8; |
| 9 | const S = struct { |
| 10 | foo: struct { inner: SomeType }, |
| 11 | }; |
| 12 | #expect_stdout="" |
| 13 | #update=add field to outer struct, change decl used by inner struct |
| 14 | #file=main.zig |
| 15 | pub fn main() void { |
| 16 | _ = @as(S, undefined); |
| 17 | } |
| 18 | // To reproduce the original bug, the inner struct must perform a namespace lookup |
| 19 | // or a scope lookup when resolving its field type. |
| 20 | const SomeType = u16; |
| 21 | const S = struct { |
| 22 | foo: struct { inner: SomeType }, |
| 23 | bar: u32, |
| 24 | }; |
| 25 | #expect_stdout="" |