mirror of
https://github.com/ziglang/zig.git
synced 2026-02-02 20:53:44 +00:00
Sema: fix comptime error set comparisons
This commit is contained in:
parent
82f6f164a1
commit
91fb45a51b
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user