mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
InternPool: support int->comptime_int in getCoerced
This commit is contained in:
parent
2052260039
commit
5555bdca04
1 changed files with 6 additions and 0 deletions
|
|
@ -3754,6 +3754,7 @@ pub fn getCoerced(ip: *InternPool, gpa: Allocator, val: Index, new_ty: Index) Al
|
||||||
.c_ulong,
|
.c_ulong,
|
||||||
.c_longlong,
|
.c_longlong,
|
||||||
.c_ulonglong,
|
.c_ulonglong,
|
||||||
|
.comptime_int,
|
||||||
=> return getCoercedInts(ip, gpa, int, new_ty),
|
=> return getCoercedInts(ip, gpa, int, new_ty),
|
||||||
else => {},
|
else => {},
|
||||||
},
|
},
|
||||||
|
|
@ -3790,6 +3791,11 @@ pub fn getCoerced(ip: *InternPool, gpa: Allocator, val: Index, new_ty: Index) Al
|
||||||
},
|
},
|
||||||
else => {},
|
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;
|
unreachable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue