-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Dependency loop caused by explicit mentioning of function pointer type #16932
New issue
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
Comments
If I change the main function to the following, the dependency loop error also occurs for pub fn main() void {
var next: ecs_iter_next_action_t = &next_action;
var it = ecs_iter_t{ .next = next };
it.next.?(&it);
} However, only if the type is actually specified, change the second line to this and it's fine again:
|
I also have a larger codebase where I wrap some C code where this issue occurs. Sometimes. Seemingly randomly. Practically the same code compiled earlier and now that I made some seemingly unrelated changes, the dependency loop error is back. |
I just created #22543 which has some things in common. |
Zig Version
0.11.0
Steps to Reproduce and Observed Behavior
With the following zig code:
Running
zig run
yields the expected output:However when running
zig test
(here with-freference-trace
), I get a dependency loop error:Expected Behavior
No dependency loop.
The text was updated successfully, but these errors were encountered: