aboutsummaryrefslogtreecommitdiff
path: root/src/Type.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2024-07-16 11:37:53 +0100
committermlugg <mlugg@mlugg.co.uk>2024-07-16 11:38:21 +0100
commitf84a4953d29ffc2bdc94fa353cac685430e6bbe4 (patch)
tree9e7e0c705451b464979cb8330e6b87de67ae1085 /src/Type.zig
parent67cd14dbdbf2ce435a2bd81dc82d167b99fad6e3 (diff)
downloadzig-f84a4953d29ffc2bdc94fa353cac685430e6bbe4.tar.gz
zig-f84a4953d29ffc2bdc94fa353cac685430e6bbe4.zip
Value: eliminate static recursion loop from value printing
Diffstat (limited to 'src/Type.zig')
-rw-r--r--src/Type.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Type.zig b/src/Type.zig
index 3a930bd381..825cc2dc5b 100644
--- a/src/Type.zig
+++ b/src/Type.zig
@@ -194,8 +194,8 @@ pub fn print(ty: Type, writer: anytype, pt: Zcu.PerThread) @TypeOf(writer).Error
if (info.sentinel != .none) switch (info.flags.size) {
.One, .C => unreachable,
- .Many => try writer.print("[*:{}]", .{Value.fromInterned(info.sentinel).fmtValue(pt, null)}),
- .Slice => try writer.print("[:{}]", .{Value.fromInterned(info.sentinel).fmtValue(pt, null)}),
+ .Many => try writer.print("[*:{}]", .{Value.fromInterned(info.sentinel).fmtValue(pt)}),
+ .Slice => try writer.print("[:{}]", .{Value.fromInterned(info.sentinel).fmtValue(pt)}),
} else switch (info.flags.size) {
.One => try writer.writeAll("*"),
.Many => try writer.writeAll("[*]"),
@@ -241,7 +241,7 @@ pub fn print(ty: Type, writer: anytype, pt: Zcu.PerThread) @TypeOf(writer).Error
} else {
try writer.print("[{d}:{}]", .{
array_type.len,
- Value.fromInterned(array_type.sentinel).fmtValue(pt, null),
+ Value.fromInterned(array_type.sentinel).fmtValue(pt),
});
try print(Type.fromInterned(array_type.child), writer, pt);
}
@@ -359,7 +359,7 @@ pub fn print(ty: Type, writer: anytype, pt: Zcu.PerThread) @TypeOf(writer).Error
try print(Type.fromInterned(field_ty), writer, pt);
if (val != .none) {
- try writer.print(" = {}", .{Value.fromInterned(val).fmtValue(pt, null)});
+ try writer.print(" = {}", .{Value.fromInterned(val).fmtValue(pt)});
}
}
try writer.writeAll("}");