authorgravatar for 11367844+lino-levan@users.noreply.github.comLino Le Van <11367844+lino-levan@users.noreply.github.com> 2024-06-02 20:42:30-07:00
committergravatar for 11367844+lino-levan@users.noreply.github.comLino Le Van <11367844+lino-levan@users.noreply.github.com> 2024-06-02 20:42:30-07:00
log0a23b89dd755e6b280205a92a5b4b19c545cb42d
treef3a11725c0c4df24c9d1359be3c6d91ed5a74c72
parent80e21e9ff2ddee04f75a3b323353cd1fcf2da4be

fix: issue with sema ignoring rhs


1 files changed, 1 insertions(+), 1 deletions(-)

src/core/Sema.zig+1-1
...@@ -326,7 +326,7 @@ fn analyzeCodeInner(s: *Sema, in: Teg.Inst.Index) Error!Air.Inst.Ref {...@@ -326,7 +326,7 @@ fn analyzeCodeInner(s: *Sema, in: Teg.Inst.Index) Error!Air.Inst.Ref {
326 const ty = try s.binTypeResolution(in, op, left_ty, right_ty);326 const ty = try s.binTypeResolution(in, op, left_ty, right_ty);
327327
328 const left = try s.coerceRef(in.op(.lhs), lhs, ty);328 const left = try s.coerceRef(in.op(.lhs), lhs, ty);
329 const right = try s.coerceRef(in.op(.rhs), lhs, ty);329 const right = try s.coerceRef(in.op(.rhs), rhs, ty);
330330
331 if (left.kind == .value and right.kind == .value) {331 if (left.kind == .value and right.kind == .value) {
332 return (try s.comptimeBin(332 return (try s.comptimeBin(