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 cast for enum literal to optionals and error unions #2867
Conversation
1867767
to
1fb6849
Compare
Could maybe have more test coverage, but this includes some basic coverage. |
7545485
to
9891df0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is almost mergable, just needs some functionality deleted
test/stage1/behavior/error.zig
Outdated
|
||
test "implicit cast from enum literal to error union" { | ||
var err1: Bar!u32 = .B; | ||
var err2: anyerror!u32 = .RandomError; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is supposed to be a compile error. There's an ambiguity if it was anyerror!Enum
and enum { RandomError }
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should now be solved
… payload of error union
9891df0
to
63083d0
Compare
Landed in e540e5b |
This is a work in progress PR that solves issue #2811.
Work to be done: