mirror of
https://github.com/ziglang/zig.git
synced 2026-02-11 12:01:18 +00:00
cbe: include hash in tuple type name
Different (simple) tuple types do not necessarily print out as different strings. This is issue would be caused by passing std.fmt.Formatter to std.fmt.format.
This commit is contained in:
parent
2dcac348e5
commit
a67ea4a4ae
@ -1468,7 +1468,7 @@ pub const DeclGen = struct {
|
||||
if (field_id == 0) try buffer.appendSlice(" char empty_tuple;\n");
|
||||
}
|
||||
const name_begin = buffer.items.len + "} ".len;
|
||||
try buffer.writer().print("}} zig_T_{};\n", .{typeToCIdentifier(t, dg.module)});
|
||||
try buffer.writer().print("}} zig_T_{}_{d};\n", .{ typeToCIdentifier(t, dg.module), @truncate(u16, t.hash(dg.module)) });
|
||||
const name_end = buffer.items.len - ";\n".len;
|
||||
|
||||
const rendered = try buffer.toOwnedSlice();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user