diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2023-05-26 18:56:31 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-06-10 20:47:55 -0700 |
| commit | 1dc01f11401b6ec0be1e7685cdc445d1b10d4f19 (patch) | |
| tree | a64c1aa2d0f7f136325971e01ac1ec4ddd79ef13 /src/value.zig | |
| parent | 9cd0ca9f482ef7f76d3f3ca683913e9aceaa47fe (diff) | |
| download | zig-1dc01f11401b6ec0be1e7685cdc445d1b10d4f19.tar.gz zig-1dc01f11401b6ec0be1e7685cdc445d1b10d4f19.zip | |
InternPool: fix build-exe and compiler-rt crashes
Diffstat (limited to 'src/value.zig')
| -rw-r--r-- | src/value.zig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/value.zig b/src/value.zig index 473b1c967c..23b90f40df 100644 --- a/src/value.zig +++ b/src/value.zig @@ -3166,6 +3166,11 @@ pub const Value = struct { .len = undefined, }; result_bigint.shiftLeft(lhs_bigint, shift); + if (ty.toIntern() != .comptime_int_type) { + const int_info = ty.intInfo(mod); + result_bigint.truncate(result_bigint.toConst(), int_info.signedness, int_info.bits); + } + return mod.intValue_big(ty, result_bigint.toConst()); } |
