You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test {
// these work fine// const E = enum { foo };// const E = enum(u0) { foo };constE=@Type(.{ .Enum= .{
.tag_type=u0,
.is_exhaustive=true,
.fields= &.{.{ .name="foo", .value=0 }},
.decls= &.{},
} });
consts: struct { E } = .{.foo};
_=s;
}
$ zig test /tmp/tmp.zig/tmp/tmp.zig:90:32: error: value stored in comptime field does not match the default value of the field const s: struct { E } = .{.foo}; ~^~~
Expected Behavior
This should work considering that the above works with enum { foo } and enum(u0) { foo }.
The text was updated successfully, but these errors were encountered:
Zig Version
0.13.0-dev.75+5c9eb4081
Steps to Reproduce and Observed Behavior
/tmp/tmp.zig
Expected Behavior
This should work considering that the above works with
enum { foo }
andenum(u0) { foo }
.The text was updated successfully, but these errors were encountered: