Skip to content

Commit fc3ff26

Browse files
committed
TypedValue: print undef @ptrFromInt pointers correctly
1 parent 0710314 commit fc3ff26

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/TypedValue.zig

+6-3
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,12 @@ pub fn print(
257257
},
258258
.ptr => |ptr| {
259259
if (ptr.addr == .int) {
260-
const i = ip.indexToKey(ptr.addr.int).int;
261-
switch (i.storage) {
262-
inline else => |addr| return writer.print("{x:0>8}", .{addr}),
260+
switch (ip.indexToKey(ptr.addr.int)) {
261+
.int => |i| switch (i.storage) {
262+
inline else => |addr| return writer.print("{x:0>8}", .{addr}),
263+
},
264+
.undef => return writer.writeAll("undefined"),
265+
else => unreachable,
263266
}
264267
}
265268

0 commit comments

Comments
 (0)