Commit 4995509028

Maksat <maksat.munaitpasov@cantor.fr>
2025-04-07 01:30:55
#23177, maintainter 'mlugg' wanted to fix that typo, 4 weeks without changes, might be forgotten
1 parent f13292a
Changed files (1)
src
src/Sema/arith.zig
@@ -67,7 +67,7 @@ pub fn addMaybeWrap(
 ) CompileError!Value {
     const zcu = sema.pt.zcu;
     if (lhs.isUndef(zcu)) return lhs;
-    if (lhs.isUndef(zcu)) return rhs;
+    if (rhs.isUndef(zcu)) return rhs;
     switch (ty.zigTypeTag(zcu)) {
         .int, .comptime_int => return (try intAddWithOverflow(sema, lhs, rhs, ty)).wrapped_result,
         .float, .comptime_float => return floatAdd(sema, lhs, rhs, ty),