-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Implicit error types crash stage1 #2203
Comments
andrewrk
added
the
bug
Observed behavior contradicts documented or intended behavior
label
Apr 7, 2019
shawnl
added a commit
to shawnl/zig
that referenced
this issue
Apr 9, 2019
shawnl
added a commit
to shawnl/zig
that referenced
this issue
Apr 10, 2019
hryx
added a commit
to hryx/zig
that referenced
this issue
May 8, 2019
The ideal way to do this is to switch on the error type, but there is a bug in the IR analyze phase described here: ziglang#2203
The parser recognizes |
+1 |
It's a compile error, because: const Error = error {Bad};
const Enum = enum {Bad};
fn foo() Error!Enum {
return .Bad; // what does this do?
} Feel free to open a proposal to discuss more. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you use an implicit error in a switch
it will crash with
Glad I finially figured out what the bug was...so I can work around it and continue hacking.
The text was updated successfully, but these errors were encountered: