| ... | ... | @@ -9244,9 +9244,9 @@ fn cmpSelf( |
| 9244 | 9244 | const resolved_type = sema.typeOf(casted_lhs); |
| 9245 | 9245 | const runtime_src: LazySrcLoc = src: { |
| 9246 | 9246 | if (try sema.resolveMaybeUndefVal(block, lhs_src, casted_lhs)) |lhs_val| { |
| 9247 | | if (lhs_val.isUndef()) return sema.addConstUndef(resolved_type); |
| 9247 | if (lhs_val.isUndef()) return sema.addConstUndef(Type.initTag(.bool)); |
| 9248 | 9248 | if (try sema.resolveMaybeUndefVal(block, rhs_src, casted_rhs)) |rhs_val| { |
| 9249 | | if (rhs_val.isUndef()) return sema.addConstUndef(resolved_type); |
| 9249 | if (rhs_val.isUndef()) return sema.addConstUndef(Type.initTag(.bool)); |
| 9250 | 9250 | |
| 9251 | 9251 | if (lhs_val.compare(op, rhs_val, resolved_type)) { |
| 9252 | 9252 | return Air.Inst.Ref.bool_true; |
| ... | ... | @@ -9265,7 +9265,7 @@ fn cmpSelf( |
| 9265 | 9265 | // bool eq/neq more efficiently. |
| 9266 | 9266 | if (resolved_type.zigTypeTag() == .Bool) { |
| 9267 | 9267 | if (try sema.resolveMaybeUndefVal(block, rhs_src, casted_rhs)) |rhs_val| { |
| 9268 | | if (rhs_val.isUndef()) return sema.addConstUndef(resolved_type); |
| 9268 | if (rhs_val.isUndef()) return sema.addConstUndef(Type.initTag(.bool)); |
| 9269 | 9269 | return sema.runtimeBoolCmp(block, op, casted_lhs, rhs_val.toBool(), lhs_src); |
| 9270 | 9270 | } |
| 9271 | 9271 | } |