diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2024-08-22 13:10:44 -0400 |
|---|---|---|
| committer | Jacob Young <jacobly0@users.noreply.github.com> | 2024-08-22 20:08:04 -0400 |
| commit | 4a132d4bce75aa9d81b5af0e8c2180ce1e0a3c60 (patch) | |
| tree | 37cb894b2473acb838f8102b7d99282a0d13913b /src/Type.zig | |
| parent | cbaff43b2a3697a168fcf9d5c022f2193d1fc9a0 (diff) | |
| download | zig-4a132d4bce75aa9d81b5af0e8c2180ce1e0a3c60.tar.gz zig-4a132d4bce75aa9d81b5af0e8c2180ce1e0a3c60.zip | |
Type: fix inconsistency between `zig fmt` and `@typeName`
Diffstat (limited to 'src/Type.zig')
| -rw-r--r-- | src/Type.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Type.zig b/src/Type.zig index 0a37e5a6f5..4437722f7d 100644 --- a/src/Type.zig +++ b/src/Type.zig @@ -202,6 +202,7 @@ pub fn print(ty: Type, writer: anytype, pt: Zcu.PerThread) @TypeOf(writer).Error .C => try writer.writeAll("[*c]"), .Slice => try writer.writeAll("[]"), } + if (info.flags.is_allowzero and info.flags.size != .C) try writer.writeAll("allowzero "); if (info.flags.alignment != .none or info.packed_offset.host_size != 0 or info.flags.vector_index != .none) @@ -229,7 +230,6 @@ pub fn print(ty: Type, writer: anytype, pt: Zcu.PerThread) @TypeOf(writer).Error } if (info.flags.is_const) try writer.writeAll("const "); if (info.flags.is_volatile) try writer.writeAll("volatile "); - if (info.flags.is_allowzero and info.flags.size != .C) try writer.writeAll("allowzero "); try print(Type.fromInterned(info.child), writer, pt); return; |
