| ... | @@ -288,7 +288,51 @@ pub const Type = struct { | ... | @@ -288,7 +288,51 @@ pub const Type = struct { |
| 288 | } | 288 | } |
| 289 | try writer.writeAll("}"); | 289 | try writer.writeAll("}"); |
| 290 | }, | 290 | }, |
| 291 | .simple_type => |s| return writer.writeAll(@tagName(s)), | 291 | .simple_type => |s| switch (s) { |
| | 292 | .f16, |
| | 293 | .f32, |
| | 294 | .f64, |
| | 295 | .f80, |
| | 296 | .f128, |
| | 297 | .usize, |
| | 298 | .isize, |
| | 299 | .c_char, |
| | 300 | .c_short, |
| | 301 | .c_ushort, |
| | 302 | .c_int, |
| | 303 | .c_uint, |
| | 304 | .c_long, |
| | 305 | .c_ulong, |
| | 306 | .c_longlong, |
| | 307 | .c_ulonglong, |
| | 308 | .c_longdouble, |
| | 309 | .anyopaque, |
| | 310 | .bool, |
| | 311 | .void, |
| | 312 | .type, |
| | 313 | .anyerror, |
| | 314 | .comptime_int, |
| | 315 | .comptime_float, |
| | 316 | .noreturn, |
| | 317 | => return writer.writeAll(@tagName(s)), |
| | 318 | .null, |
| | 319 | .undefined, |
| | 320 | => try writer.print("@TypeOf({s})", .{@tagName(s)}), |
| | 321 | .enum_literal => try writer.print("@TypeOf(.{s})", .{@tagName(s)}), |
| | 322 | .atomic_order, |
| | 323 | .atomic_rmw_op, |
| | 324 | .calling_convention, |
| | 325 | .address_space, |
| | 326 | .float_mode, |
| | 327 | .reduce_op, |
| | 328 | .call_modifier, |
| | 329 | .prefetch_options, |
| | 330 | .export_options, |
| | 331 | .extern_options, |
| | 332 | .type_info, |
| | 333 | .generic_poison, |
| | 334 | => unreachable, |
| | 335 | }, |
| 292 | .struct_type => |struct_type| { | 336 | .struct_type => |struct_type| { |
| 293 | if (mod.structPtrUnwrap(struct_type.index)) |struct_obj| { | 337 | if (mod.structPtrUnwrap(struct_type.index)) |struct_obj| { |
| 294 | const decl = mod.declPtr(struct_obj.owner_decl); | 338 | const decl = mod.declPtr(struct_obj.owner_decl); |