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

Compiler hangs on function declared as returning !noreturn #4698

Closed
ghost opened this issue Mar 9, 2020 · 1 comment
Closed

Compiler hangs on function declared as returning !noreturn #4698

ghost opened this issue Mar 9, 2020 · 1 comment

Comments

@ghost
Copy link

ghost commented Mar 9, 2020

fn fail() !noreturn {
    return error.Dang;
}

pub fn main() void {
    fail() catch {};
}

The compiler seems to hang indefinitely.

@ghost ghost changed the title Compiler hangs on function declared as returning !unreachable Compiler hangs on function declared as returning !noreturn Mar 9, 2020
@LemonBoy
Copy link
Contributor

LemonBoy commented Mar 9, 2020

Duplicate of #3461, the !noreturn combo should be disallowed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants