Skip to content
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

Loop inside a defer inside an if expr the result of which is assigned to a variable causes an infinite loop during analysis #9600

Open
Vexu opened this issue Aug 21, 2021 · 0 comments · May be fixed by #21365
Labels
bug Observed behavior contradicts documented or intended behavior stage1 The process of building from source via WebAssembly and the C backend.
Milestone

Comments

@Vexu
Copy link
Member

Vexu commented Aug 21, 2021

Changing anything in this example will fix the issue

test {
    var cond = false;
    var res = if (cond) blk: {
        defer  while (true) {};
        break :blk true;
    } else false;
    _ = res;
}
@Vexu Vexu added bug Observed behavior contradicts documented or intended behavior stage1 The process of building from source via WebAssembly and the C backend. labels Aug 21, 2021
@Vexu Vexu added this to the 0.10.0 milestone Aug 21, 2021
RetroDev256 added a commit to RetroDev256/zig that referenced this issue Sep 9, 2024
RetroDev256 added a commit to RetroDev256/zig that referenced this issue Sep 9, 2024
@RetroDev256 RetroDev256 linked a pull request Sep 9, 2024 that will close this issue
RetroDev256 added a commit to RetroDev256/zig that referenced this issue Sep 9, 2024
RetroDev256 added a commit to RetroDev256/zig that referenced this issue Sep 9, 2024
RetroDev256 added a commit to RetroDev256/zig that referenced this issue Sep 9, 2024
RetroDev256 added a commit to RetroDev256/zig that referenced this issue Sep 10, 2024
RetroDev256 added a commit to RetroDev256/zig that referenced this issue Sep 10, 2024
RetroDev256 added a commit to RetroDev256/zig that referenced this issue Nov 24, 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 stage1 The process of building from source via WebAssembly and the C backend.
Projects
None yet
1 participant