Closed
Description
const std = @import("std");
const expect = std.testing.expect;
const Node = struct {
next: *Node,
};
const a: Node = .{ .next = &b };
const b: Node = .{ .next = &a };
test "example" {
expect(a.next == &b);
expect(b.next == &a);
}
Currently, this test case produces the following results:
test.zig:8:1: error: dependency loop detected
const a: Node = .{ .next = &b };
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
referenced by:
a: test.zig:8:29
b: test.zig:9:29
remaining reference traces hidden; use '-freference-trace' to see all reference traces