| ... | @@ -2165,7 +2165,10 @@ fn airIsNull( | ... | @@ -2165,7 +2165,10 @@ fn airIsNull( |
| 2165 | | 2165 | |
| 2166 | const ty = f.air.typeOf(un_op); | 2166 | const ty = f.air.typeOf(un_op); |
| 2167 | var opt_buf: Type.Payload.ElemType = undefined; | 2167 | var opt_buf: Type.Payload.ElemType = undefined; |
| 2168 | const payload_type = ty.optionalChild(&opt_buf); | 2168 | const payload_type = if (ty.zigTypeTag() == .Pointer) |
| | 2169 | ty.childType().optionalChild(&opt_buf) |
| | 2170 | else |
| | 2171 | ty.optionalChild(&opt_buf); |
| 2169 | | 2172 | |
| 2170 | if (ty.isPtrLikeOptional()) { | 2173 | if (ty.isPtrLikeOptional()) { |
| 2171 | // operand is a regular pointer, test `operand !=/== NULL` | 2174 | // operand is a regular pointer, test `operand !=/== NULL` |