aboutsummaryrefslogtreecommitdiff
path: root/src/value.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/value.zig')
-rw-r--r--src/value.zig5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/value.zig b/src/value.zig
index d63452ee56..005f1f1ffd 100644
--- a/src/value.zig
+++ b/src/value.zig
@@ -2977,6 +2977,11 @@ pub const Value = extern union {
const info = ty.intInfo(target);
+ if (info.bits == 0) {
+ assert(val.isZero()); // Sema should guarantee
+ return val;
+ }
+
// TODO is this a performance issue? maybe we should try the operation without
// resorting to BigInt first.
var val_space: Value.BigIntSpace = undefined;