You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This should compile successfully. There is only a dependency on the pointer, not the actual struct, so the size is known.
If I remove the std.atomic.Atomic, it also compiles.
Actual Behavior
./example.zig:29:28: error: struct 'WriteState' depends on itself
const WriteState = struct {
^
./example.zig:31:13: note: while checking this field
writer: ? *Writer,
^
./example.zig:16:13: note: while checking this field
item: T,
^
./example.zig:20:9: note: while checking this field
head: ?*Node = null,
^
./example.zig:36:17: note: while checking this field
list: DoublyLinkedList(*WriteState) ,
^
./example.zig:41:13: note: while checking this field
young: List,
^
The text was updated successfully, but these errors were encountered:
ayende
added
the
bug
Observed behavior contradicts documented or intended behavior
label
Jan 21, 2022
Zig Version
0.9
Steps to Reproduce
The following code fails to compile (can see it live here: https://godbolt.org/z/vrqj7Pz5f).
Expected Behavior
This should compile successfully. There is only a dependency on the pointer, not the actual struct, so the size is known.
If I remove the
std.atomic.Atomic
, it also compiles.Actual Behavior
The text was updated successfully, but these errors were encountered: