aboutsummaryrefslogtreecommitdiff
path: root/src/Type.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Type.zig')
-rw-r--r--src/Type.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Type.zig b/src/Type.zig
index a199811c8e..9316bec11e 100644
--- a/src/Type.zig
+++ b/src/Type.zig
@@ -4166,7 +4166,7 @@ pub const generic_poison: Type = .{ .ip_index = .generic_poison_type };
pub fn smallestUnsignedBits(max: u64) u16 {
return switch (max) {
0 => 0,
- else => 1 + std.math.log2_int(u64, max),
+ else => @as(u16, 1) + std.math.log2_int(u64, max),
};
}