We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.12.0-dev.926+3be8490d8
The following codes cannot be compiled.
const A = struct { b: ?*B = null, n: usize, }; const B = struct { a: A = A{ .n = 1 }, }; pub fn main() void { _ = A{ .n = 10 }; }
$ zig build-exe false_dependency_loop.zig false_dependency_loop.zig:1:11: error: struct 'false_dependency_loop.A' depends on itself const A = struct { ^~~~~~ $
I expect the compile gets successful since A.b is a pointer.
The text was updated successfully, but these errors were encountered:
#17490 may solve this
Sorry, something went wrong.
Confirming that PR does fix this case.
I found that this issue was resolved in 0.12.0-dev.1504+81219586b at the latest, meybe thanks to #17692
Successfully merging a pull request may close this issue.
Zig Version
0.12.0-dev.926+3be8490d8
Steps to Reproduce and Observed Behavior
The following codes cannot be compiled.
$ zig build-exe false_dependency_loop.zig false_dependency_loop.zig:1:11: error: struct 'false_dependency_loop.A' depends on itself const A = struct { ^~~~~~ $
Expected Behavior
I expect the compile gets successful since A.b is a pointer.
The text was updated successfully, but these errors were encountered: