diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-05-23 19:49:18 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-06-10 20:47:54 -0700 |
| commit | 5555bdca047f8dbf8d7adfa8f248f5ce9b692b9e (patch) | |
| tree | 04b34d5ecdb0afc6650656ce396ba17333e948d5 /src/InternPool.zig | |
| parent | 20522600399fb38e8e220cab0f8f59234725b9f1 (diff) | |
| download | zig-5555bdca047f8dbf8d7adfa8f248f5ce9b692b9e.tar.gz zig-5555bdca047f8dbf8d7adfa8f248f5ce9b692b9e.zip | |
InternPool: support int->comptime_int in getCoerced
Diffstat (limited to 'src/InternPool.zig')
| -rw-r--r-- | src/InternPool.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/InternPool.zig b/src/InternPool.zig index c15e1afead..d19cc3d647 100644 --- a/src/InternPool.zig +++ b/src/InternPool.zig @@ -3754,6 +3754,7 @@ pub fn getCoerced(ip: *InternPool, gpa: Allocator, val: Index, new_ty: Index) Al .c_ulong, .c_longlong, .c_ulonglong, + .comptime_int, => return getCoercedInts(ip, gpa, int, new_ty), else => {}, }, @@ -3790,6 +3791,11 @@ pub fn getCoerced(ip: *InternPool, gpa: Allocator, val: Index, new_ty: Index) Al }, else => {}, } + if (std.debug.runtime_safety) { + std.debug.panic("val={any} new_ty={any}\n", .{ + ip.items.get(@enumToInt(val)), ip.items.get(@enumToInt(new_ty)), + }); + } unreachable; } |
