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

noreturn with an error union causes compiler hang #10725

Closed
ieeemma opened this issue Jan 29, 2022 · 1 comment
Closed

noreturn with an error union causes compiler hang #10725

ieeemma opened this issue Jan 29, 2022 · 1 comment
Labels
bug Observed behavior contradicts documented or intended behavior

Comments

@ieeemma
Copy link
Contributor

ieeemma commented Jan 29, 2022

Zig Version

0.10.0-dev.62+5b171f446

Steps to Reproduce

pub fn main() !noreturn {
    unreachable;
}

Expected Behavior

Since !noreturn is invalid, the compiler should produce an error for any function with this return type.

Actual Behavior

The compiler hangs, and quickly OOMs.

@ieeemma ieeemma added the bug Observed behavior contradicts documented or intended behavior label Jan 29, 2022
@Vexu
Copy link
Member

Vexu commented Jan 29, 2022

Duplicate of #3461

@Vexu Vexu marked this as a duplicate of #3461 Jan 29, 2022
@Vexu Vexu closed this as completed Jan 29, 2022
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

2 participants