commit 91fb45a51b3fe29772c71cc353aaf1e07caeb507 (tree) parent 82f6f164a1af6557451e580dcf3197ad94e5437e Author: Jacob Young <jacobly0@users.noreply.github.com> Date: Tue, 30 May 2023 21:25:48 -0400 Sema: fix comptime error set comparisons Diffstat:
| M | src/Sema.zig | | | 4 | +++- |
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/Sema.zig b/src/Sema.zig @@ -15392,7 +15392,9 @@ fn zirCmpEq( if (lval.isUndef(mod) or rval.isUndef(mod)) { return sema.addConstUndef(Type.bool); } - if (lval.toIntern() == rval.toIntern()) { + const lkey = mod.intern_pool.indexToKey(lval.toIntern()); + const rkey = mod.intern_pool.indexToKey(rval.toIntern()); + if ((lkey.err.name == rkey.err.name) == (op == .eq)) { return Air.Inst.Ref.bool_true; } else { return Air.Inst.Ref.bool_false;