aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/indirect_struct_loop.zig
blob: ef5526830e9882277c41fbc2307796842433d54b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const A = struct {
    b: B,
};
const B = struct {
    c: C,
};
const C = struct {
    a: A,
};
export fn entry() usize {
    return @sizeOf(A);
}

// error
// backend=stage2
// target=native
//
// :1:11: error: struct 'tmp.A' depends on itself
// :8:5: note: while checking this field
// :5:5: note: while checking this field
// :2:5: note: while checking this field