Skip to content

Instantly share code, notes, and snippets.

@tadeokondrak
Created January 26, 2020 03:59
Show Gist options
  • Save tadeokondrak/71bb2d3fdc20eb0e30d04020a834aaf1 to your computer and use it in GitHub Desktop.
Save tadeokondrak/71bb2d3fdc20eb0e30d04020a834aaf1 to your computer and use it in GitHub Desktop.
pub const T = struct {
other: *T,
};
pub const A = struct {
pub const constant: T = T{ .other = &B.constant };
};
pub const B = struct {
pub const constant: T = T{ .other = &A.constant };
};
test "loop" {
const a = A.constant;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment