| ... | @@ -492,11 +492,11 @@ pub const DeclGen = struct { | ... | @@ -492,11 +492,11 @@ pub const DeclGen = struct { |
| 492 | const index = field_ptr.field_index; | 492 | const index = field_ptr.field_index; |
| 493 | const FieldInfo = struct { name: []const u8, ty: Type }; | 493 | const FieldInfo = struct { name: []const u8, ty: Type }; |
| 494 | const field_info: FieldInfo = switch (container_ty.zigTypeTag()) { | 494 | const field_info: FieldInfo = switch (container_ty.zigTypeTag()) { |
| 495 | .Struct => .{ | 495 | .Struct => FieldInfo{ |
| 496 | .name = container_ty.structFields().keys()[index], | 496 | .name = container_ty.structFields().keys()[index], |
| 497 | .ty = container_ty.structFields().values()[index].ty, | 497 | .ty = container_ty.structFields().values()[index].ty, |
| 498 | }, | 498 | }, |
| 499 | .Union => .{ | 499 | .Union => FieldInfo{ |
| 500 | .name = container_ty.unionFields().keys()[index], | 500 | .name = container_ty.unionFields().keys()[index], |
| 501 | .ty = container_ty.unionFields().values()[index].ty, | 501 | .ty = container_ty.unionFields().values()[index].ty, |
| 502 | }, | 502 | }, |
| ... | @@ -1622,7 +1622,12 @@ pub const DeclGen = struct { | ... | @@ -1622,7 +1622,12 @@ pub const DeclGen = struct { |
| 1622 | const int_info = ty.intInfo(target); | 1622 | const int_info = ty.intInfo(target); |
| 1623 | _ = toCIntBits(int_info.bits) orelse | 1623 | _ = toCIntBits(int_info.bits) orelse |
| 1624 | return dg.fail("TODO implement integer constants larger than 128 bits", .{}); | 1624 | return dg.fail("TODO implement integer constants larger than 128 bits", .{}); |
| 1625 | return .{ .ty = ty, .target = target, .int_val = int_val, .location = location }; | 1625 | return IntLiteralFormatter(@TypeOf(int_val)){ |
| | 1626 | .ty = ty, |
| | 1627 | .target = target, |
| | 1628 | .int_val = int_val, |
| | 1629 | .location = location, |
| | 1630 | }; |
| 1626 | } | 1631 | } |
| 1627 | }; | 1632 | }; |
| 1628 | | 1633 | |