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