From 0a23b89dd755e6b280205a92a5b4b19c545cb42d Mon Sep 17 00:00:00 2001 From: Lino Le Van <11367844+lino-levan@users.noreply.github.com> Date: Sun, 2 Jun 2024 20:42:30 -0700 Subject: [PATCH] fix: issue with sema ignoring rhs --- src/core/Sema.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Sema.zig b/src/core/Sema.zig index 30c32f680aae804b2022dd59be27f7477b296c96..dbcef0664f2fbc093f9f44754ecc12b88edcd1e3 100644 --- a/src/core/Sema.zig +++ b/src/core/Sema.zig @@ -326,7 +326,7 @@ fn analyzeCodeInner(s: *Sema, in: Teg.Inst.Index) Error!Air.Inst.Ref { const ty = try s.binTypeResolution(in, op, left_ty, right_ty); const left = try s.coerceRef(in.op(.lhs), lhs, ty); - const right = try s.coerceRef(in.op(.rhs), lhs, ty); + const right = try s.coerceRef(in.op(.rhs), rhs, ty); if (left.kind == .value and right.kind == .value) { return (try s.comptimeBin( -- 2.54.0