mirror of
https://github.com/ziglang/zig.git
synced 2026-01-07 14:03:26 +00:00
TypedValue: print undef @ptrFromInt pointers correctly
This commit is contained in:
parent
0710314de6
commit
fc3ff26237
@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user