1#update=initial version
2#file=main.zig
3pub 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.
8const SomeType = u8;
9const 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
15pub 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.
20const SomeType = u16;
21const S = struct {
22 foo: struct { inner: SomeType },
23 bar: u32,
24};
25#expect_stdout=""