Skip to content

Incorrect dependency loop from struct default value #14005

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

Closed
Vexu opened this issue Dec 19, 2022 · 1 comment
Closed

Incorrect dependency loop from struct default value #14005

Vexu opened this issue Dec 19, 2022 · 1 comment
Labels
bug Observed behavior contradicts documented or intended behavior
Milestone

Comments

@Vexu
Copy link
Member

Vexu commented Dec 19, 2022

Found in bun:

const S = struct {
    s: *S = &S.instance,
    var instance: S = undefined;
};
comptime {
    _ = S.instance;
}
@Vexu Vexu added the bug Observed behavior contradicts documented or intended behavior label Dec 19, 2022
@Vexu Vexu added this to the 0.10.1 milestone Dec 19, 2022
@andrewrk andrewrk modified the milestones: 0.10.1, 0.11.0 Jan 10, 2023
@andrewrk andrewrk modified the milestones: 0.11.0, 0.11.1 Jul 20, 2023
@ianprime0509
Copy link
Contributor

It looks like this should have been closed with #17692, since it was added as a behavior test in that PR: https://github.com/ziglang/zig/pull/17692/files#diff-e88bfbf758018704fbee1f67030cab3ba987e51e7c1516fe2cbf5bccf0dbfbf5R1809-R1824

@Vexu Vexu closed this as completed Nov 22, 2023
@andrewrk andrewrk modified the milestones: 0.11.1, 0.12.0 Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior
Projects
None yet
Development

No branches or pull requests

3 participants