mirror of
https://github.com/ziglang/zig.git
synced 2026-01-06 13:33:21 +00:00
TypedValue: fix crash for tuples when printing
This commit is contained in:
parent
dca17d3603
commit
7d9cf156c3
@ -437,7 +437,7 @@ fn printAggregate(
|
||||
if (i != 0) try writer.writeAll(", ");
|
||||
|
||||
const field_name = switch (ip.indexToKey(ty.toIntern())) {
|
||||
.struct_type => |x| x.field_names.get(ip)[i].toOptional(),
|
||||
.struct_type => |x| x.fieldName(ip, i),
|
||||
.anon_struct_type => |x| if (x.isTuple()) .none else x.names.get(ip)[i].toOptional(),
|
||||
else => unreachable,
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user