authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-05-23 19:49:18-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-06-10 20:47:54-07:00
log5555bdca047f8dbf8d7adfa8f248f5ce9b692b9e
tree04b34d5ecdb0afc6650656ce396ba17333e948d5
parent20522600399fb38e8e220cab0f8f59234725b9f1

InternPool: support int->comptime_int in getCoerced


1 files changed, 6 insertions(+), 0 deletions(-)

src/InternPool.zig+6
......@@ -3754,6 +3754,7 @@ pub fn getCoerced(ip: *InternPool, gpa: Allocator, val: Index, new_ty: Index) Al
37543754 .c_ulong,
37553755 .c_longlong,
37563756 .c_ulonglong,
3757 .comptime_int,
37573758 => return getCoercedInts(ip, gpa, int, new_ty),
37583759 else => {},
37593760 },
......@@ -3790,6 +3791,11 @@ pub fn getCoerced(ip: *InternPool, gpa: Allocator, val: Index, new_ty: Index) Al
37903791 },
37913792 else => {},
37923793 }
3794 if (std.debug.runtime_safety) {
3795 std.debug.panic("val={any} new_ty={any}\n", .{
3796 ip.items.get(@enumToInt(val)), ip.items.get(@enumToInt(new_ty)),
3797 });
3798 }
37933799 unreachable;
37943800}
37953801