| 1 | const A = struct { |
| 2 | b: B, |
| 3 | }; |
| 4 | const B = struct { |
| 5 | a: A, |
| 6 | }; |
| 7 | comptime { |
| 8 | _ = @as(A, undefined); |
| 9 | } |
| 10 | |
| 11 | // error |
| 12 | // |
| 13 | // error: dependency loop with length 2 |
| 14 | // :2:8: note: type 'tmp.A' depends on type 'tmp.B' for field declared here |
| 15 | // :5:8: note: type 'tmp.B' depends on type 'tmp.A' for field declared here |
| 16 | // note: eliminate any one of these dependencies to break the loop |