Fix list.FieldEnum when there are no fields

This commit is contained in:
Isaac Freund
2023-02-27 13:26:23 +01:00
parent e88586a81a
commit 676ba262dd

View File

@@ -443,7 +443,7 @@ pub const list = struct {
return @Type(.{
.Enum = .{
.layout = .Auto,
.tag_type = std.math.IntFittingRange(0, field_infos.len - 1),
.tag_type = std.math.IntFittingRange(0, field_infos.len -| 1),
.fields = &enum_fields,
.decls = &.{},
.is_exhaustive = true,