diff options
| author | Veikka Tuominen <git@vexu.eu> | 2022-08-21 18:04:46 +0300 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2022-08-22 11:16:36 +0300 |
| commit | b55a5007faad1de054e86e00bfdc9a58e5fc4ff8 (patch) | |
| tree | e0c0713b6056b24f48e614805225739e8069f420 /lib/std/math.zig | |
| parent | b2f02a820f1ed46721ed55243cead52efed055d7 (diff) | |
| download | zig-b55a5007faad1de054e86e00bfdc9a58e5fc4ff8.tar.gz zig-b55a5007faad1de054e86e00bfdc9a58e5fc4ff8.zip | |
Sema: fix parameter of type 'T' must be comptime error
Closes #12519
Closes #12505
Diffstat (limited to 'lib/std/math.zig')
| -rw-r--r-- | lib/std/math.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/math.zig b/lib/std/math.zig index 40b5eb9204..1ed9604612 100644 --- a/lib/std/math.zig +++ b/lib/std/math.zig @@ -1548,7 +1548,7 @@ test "boolMask" { } /// Return the mod of `num` with the smallest integer type -pub fn comptimeMod(num: anytype, denom: comptime_int) IntFittingRange(0, denom - 1) { +pub fn comptimeMod(num: anytype, comptime denom: comptime_int) IntFittingRange(0, denom - 1) { return @intCast(IntFittingRange(0, denom - 1), @mod(num, denom)); } |
