Skip to content

Commit ead658d

Browse files
authored
Fix: Update enum reflection syntax (#8)
* Fix: Update enum reflection syntax * Update zig version
1 parent 4289bf7 commit ead658d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.zigversion

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.14.0-dev.1911+3bf89f55c
1+
0.14.0-dev.2563+af5e73172

src/wrapper.zig

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const assert = std.debug.assert;
66

77
const meta = struct {
88
pub fn mergeEnums(comptime Enums: anytype) type {
9-
const tag_type = @typeInfo(Enums[0]).Enum.tag_type;
9+
const tag_type = @typeInfo(Enums[0]).@"enum".tag_type;
1010
const num_fields = countFields: {
1111
var count: comptime_int = 0;
1212
for (Enums) |Subset| {
@@ -17,15 +17,15 @@ const meta = struct {
1717
comptime var fields: [num_fields]std.builtin.Type.EnumField = .{undefined} ** num_fields;
1818
comptime var i = 0;
1919
for (Enums) |Subset| {
20-
const subset_info = @typeInfo(Subset).Enum;
20+
const subset_info = @typeInfo(Subset).@"enum";
2121
assert(subset_info.tag_type == tag_type);
2222
for (subset_info.fields) |field| {
2323
assert(i < fields.len);
2424
fields[i] = field;
2525
i += 1;
2626
}
2727
}
28-
return @Type(.{ .Enum = .{
28+
return @Type(.{ .@"enum" = .{
2929
.tag_type = tag_type,
3030
.fields = &fields,
3131
.decls = &.{},

0 commit comments

Comments
 (0)