Sema: improve circular dependency errors
This commit is contained in:
9
test/cases/compile_errors/direct_struct_loop.zig
Normal file
9
test/cases/compile_errors/direct_struct_loop.zig
Normal file
@@ -0,0 +1,9 @@
|
||||
const A = struct { a : A, };
|
||||
export fn entry() usize { return @sizeOf(A); }
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :1:11: error: struct 'tmp.A' depends on itself
|
||||
// :1:20: note: while checking this field
|
||||
Reference in New Issue
Block a user