zig/test/cases/compile_errors/indirect_struct_loop.zig
Eric Joldasov 50339f595a all: zig fmt and rename "@XToY" to "@YFromX"
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-06-19 12:34:42 -07:00

21 lines
368 B
Zig

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