| ... | @@ -3924,6 +3924,7 @@ const DeclGen = struct { | ... | @@ -3924,6 +3924,7 @@ const DeclGen = struct { |
| 3924 | }; | 3924 | }; |
| 3925 | break :blk if (backing_bits <= 32) @as(u32, 1) else 2; | 3925 | break :blk if (backing_bits <= 32) @as(u32, 1) else 2; |
| 3926 | }, | 3926 | }, |
| | 3927 | .ErrorSet => 1, |
| 3927 | else => return self.todo("implement switch for type {s}", .{@tagName(cond_ty.zigTypeTag(mod))}), // TODO: Figure out which types apply here, and work around them as we can only do integers. | 3928 | else => return self.todo("implement switch for type {s}", .{@tagName(cond_ty.zigTypeTag(mod))}), // TODO: Figure out which types apply here, and work around them as we can only do integers. |
| 3928 | }; | 3929 | }; |
| 3929 | | 3930 | |
| ... | @@ -3977,6 +3978,7 @@ const DeclGen = struct { | ... | @@ -3977,6 +3978,7 @@ const DeclGen = struct { |
| 3977 | // TODO: figure out of cond_ty is correct (something with enum literals) | 3978 | // TODO: figure out of cond_ty is correct (something with enum literals) |
| 3978 | break :blk (try value.intFromEnum(cond_ty, mod)).toUnsignedInt(mod); // TODO: composite integer constants | 3979 | break :blk (try value.intFromEnum(cond_ty, mod)).toUnsignedInt(mod); // TODO: composite integer constants |
| 3979 | }, | 3980 | }, |
| | 3981 | .ErrorSet => value.getErrorInt(mod), |
| 3980 | else => unreachable, | 3982 | else => unreachable, |
| 3981 | }; | 3983 | }; |
| 3982 | const int_lit: spec.LiteralContextDependentNumber = switch (cond_words) { | 3984 | const int_lit: spec.LiteralContextDependentNumber = switch (cond_words) { |