From aa78ebaf95af5a3587194d8dbcb101a49c0bb898 Mon Sep 17 00:00:00 2001 From: Veikka Tuominen Date: Tue, 2 Aug 2022 19:54:54 +0300 Subject: Sema: improve circular dependency errors --- test/cases/compile_errors/indirect_struct_loop.zig | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/cases/compile_errors/indirect_struct_loop.zig (limited to 'test/cases/compile_errors/indirect_struct_loop.zig') diff --git a/test/cases/compile_errors/indirect_struct_loop.zig b/test/cases/compile_errors/indirect_struct_loop.zig new file mode 100644 index 0000000000..dca2b9c3f6 --- /dev/null +++ b/test/cases/compile_errors/indirect_struct_loop.zig @@ -0,0 +1,13 @@ +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 +// :3:20: note: while checking this field +// :2:20: note: while checking this field +// :1:20: note: while checking this field -- cgit v1.2.3