Skip to content

Commit 5555bdc

Browse files
committed
InternPool: support int->comptime_int in getCoerced
1 parent 2052260 commit 5555bdc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/InternPool.zig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

0 commit comments

Comments
 (0)