Skip to content

Commit 4fc7836

Browse files
munmaksmlugg
authored andcommitted
Sema/arith.zig: Fixing more typos from #23177.
This is a complementary PR to #23487 (I had only found one typo before). Now I've looked at the whole `arith.zig` file, trying to find other potential problems. Discussion about these changes: #23177 (comment)
1 parent 79a620d commit 4fc7836

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Sema/arith.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ pub fn subMaybeWrap(
8686
) CompileError!Value {
8787
const zcu = sema.pt.zcu;
8888
if (lhs.isUndef(zcu)) return lhs;
89-
if (lhs.isUndef(zcu)) return rhs;
89+
if (rhs.isUndef(zcu)) return rhs;
9090
switch (ty.zigTypeTag(zcu)) {
9191
.int, .comptime_int => return (try intSubWithOverflow(sema, lhs, rhs, ty)).wrapped_result,
9292
.float, .comptime_float => return floatSub(sema, lhs, rhs, ty),
@@ -105,7 +105,7 @@ pub fn mulMaybeWrap(
105105
) CompileError!Value {
106106
const zcu = sema.pt.zcu;
107107
if (lhs.isUndef(zcu)) return lhs;
108-
if (lhs.isUndef(zcu)) return rhs;
108+
if (rhs.isUndef(zcu)) return rhs;
109109
switch (ty.zigTypeTag(zcu)) {
110110
.int, .comptime_int => return (try intMulWithOverflow(sema, lhs, rhs, ty)).wrapped_result,
111111
.float, .comptime_float => return floatMul(sema, lhs, rhs, ty),

0 commit comments

Comments
 (0)