TypedValue: print undef @ptrFromInt pointers correctly

This commit is contained in:
mlugg 2023-09-15 23:17:56 +01:00 committed by Matthew Lugg
parent 0710314de6
commit fc3ff26237

View File

@ -257,9 +257,12 @@ pub fn print(
},
.ptr => |ptr| {
if (ptr.addr == .int) {
const i = ip.indexToKey(ptr.addr.int).int;
switch (i.storage) {
inline else => |addr| return writer.print("{x:0>8}", .{addr}),
switch (ip.indexToKey(ptr.addr.int)) {
.int => |i| switch (i.storage) {
inline else => |addr| return writer.print("{x:0>8}", .{addr}),
},
.undef => return writer.writeAll("undefined"),
else => unreachable,
}
}