-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
unreachable code error prevents idiomatic usage of defer #2198
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: