| ... | ... | @@ -26897,10 +26897,14 @@ fn analyzeIsNull( |
| 26897 | 26897 | } |
| 26898 | 26898 | } |
| 26899 | 26899 | |
| 26900 | const inverted_non_null_res = if (invert_logic) Air.Inst.Ref.bool_true else Air.Inst.Ref.bool_false; |
| 26900 | 26901 | const operand_ty = sema.typeOf(operand); |
| 26901 | 26902 | var buf: Type.Payload.ElemType = undefined; |
| 26902 | 26903 | if (operand_ty.zigTypeTag() == .Optional and operand_ty.optionalChild(&buf).zigTypeTag() == .NoReturn) { |
| 26903 | | return Air.Inst.Ref.bool_true; |
| 26904 | return inverted_non_null_res; |
| 26905 | } |
| 26906 | if (operand_ty.zigTypeTag() != .Optional and !operand_ty.isPtrLikeOptional()) { |
| 26907 | return inverted_non_null_res; |
| 26904 | 26908 | } |
| 26905 | 26909 | try sema.requireRuntimeBlock(block, src, null); |
| 26906 | 26910 | const air_tag: Air.Inst.Tag = if (invert_logic) .is_non_null else .is_null; |