diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2023-05-30 21:25:48 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-06-10 20:47:57 -0700 |
| commit | 91fb45a51b3fe29772c71cc353aaf1e07caeb507 (patch) | |
| tree | 302d19fe2477797f59b1cf6a24376653963d3f2e /src/Sema.zig | |
| parent | 82f6f164a1af6557451e580dcf3197ad94e5437e (diff) | |
| download | zig-91fb45a51b3fe29772c71cc353aaf1e07caeb507.tar.gz zig-91fb45a51b3fe29772c71cc353aaf1e07caeb507.zip | |
Sema: fix comptime error set comparisons
Diffstat (limited to 'src/Sema.zig')
| -rw-r--r-- | src/Sema.zig | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Sema.zig b/src/Sema.zig index 9c458cc433..2ee3404f66 100644 --- 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; |
