| 1 | const a: @TypeOf(b) = 0; |
| 2 | const b: @TypeOf(a) = 0; |
| 3 | export fn entry() void { |
| 4 | const c = a + b; |
| 5 | _ = c; |
| 6 | } |
| 7 | |
| 8 | // error |
| 9 | // |
| 10 | // error: dependency loop with length 4 |
| 11 | // :1:23: note: value of declaration 'tmp.a' uses type of declaration 'tmp.a' here |
| 12 | // :1:18: note: type of declaration 'tmp.a' uses value of declaration 'tmp.b' here |
| 13 | // :2:23: note: value of declaration 'tmp.b' uses type of declaration 'tmp.b' here |
| 14 | // :2:18: note: type of declaration 'tmp.b' uses value of declaration 'tmp.a' here |
| 15 | // note: eliminate any one of these dependencies to break the loop |