From 499550902824ad8862cd43f972fdb052df531e2c Mon Sep 17 00:00:00 2001 From: Maksat Date: Mon, 7 Apr 2025 01:30:55 +0200 Subject: [PATCH] #23177, maintainter 'mlugg' wanted to fix that typo, 4 weeks without changes, might be forgotten --- src/Sema/arith.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Sema/arith.zig b/src/Sema/arith.zig index 0c66ad9a91..cc88cd6ade 100644 --- a/src/Sema/arith.zig +++ b/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),