-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
unreachable code error prevents idiomatic usage of defer #2198
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
Existing example of this in the self-hosted compiler. https://github.com/ziglang/zig/blob/master/src-self-hosted/main.zig#L65-L68 |
This might be solved with #283 |
oooo, this is really interesting, and infact a "good thing"! |
So |
I'm not sure that's useful in the general case. If I have a function annotated |
This is now a duplicate of accepted proposal #2654. See the explanation there. Preferred solution to the above code is: defer unreachable; |
Expected: this compiles.
Actual:
The text was updated successfully, but these errors were encountered: