Missing compile error for enum(u0){a,_}
#19856
Labels
bug
Observed behavior contradicts documented or intended behavior
enum(u0){a,_}
#19856
Zig Version
0.13.0-dev.46+3648d7df1, 0.12.0-dev.3182+f3227598e
Steps to Reproduce and Observed Behavior
The compiler currently errors when an enum is declared as non-exhaustive (with pseudo-member
_
) while specifying every possible value as state.However, this error doesn't trigger when the backing type is a zero-bit type (
u0
ori0
):Expected Behavior
Note that the same error is present for instantiation via
@Type
; I assume the compiler-internal code for both places is shared, so that a fix would apply to both scenarios.The text was updated successfully, but these errors were encountered: