| ... | @@ -9275,6 +9275,24 @@ static ZigType *ir_resolve_peer_types(IrAnalyze *ira, AstNode *source_node, ZigT | ... | @@ -9275,6 +9275,24 @@ static ZigType *ir_resolve_peer_types(IrAnalyze *ira, AstNode *source_node, ZigT |
| 9275 | continue; | 9275 | continue; |
| 9276 | } | 9276 | } |
| 9277 | | 9277 | |
| | 9278 | if (prev_type->id == ZigTypeIdPointer && cur_type->id == ZigTypeIdPointer) { |
| | 9279 | if (prev_type->data.pointer.ptr_len == PtrLenC && |
| | 9280 | types_match_const_cast_only(ira, prev_type->data.pointer.child_type, |
| | 9281 | cur_type->data.pointer.child_type, source_node, |
| | 9282 | !prev_type->data.pointer.is_const).id == ConstCastResultIdOk) |
| | 9283 | { |
| | 9284 | continue; |
| | 9285 | } |
| | 9286 | if (cur_type->data.pointer.ptr_len == PtrLenC && |
| | 9287 | types_match_const_cast_only(ira, cur_type->data.pointer.child_type, |
| | 9288 | prev_type->data.pointer.child_type, source_node, |
| | 9289 | !cur_type->data.pointer.is_const).id == ConstCastResultIdOk) |
| | 9290 | { |
| | 9291 | prev_inst = cur_inst; |
| | 9292 | continue; |
| | 9293 | } |
| | 9294 | } |
| | 9295 | |
| 9278 | if (types_match_const_cast_only(ira, prev_type, cur_type, source_node, false).id == ConstCastResultIdOk) { | 9296 | if (types_match_const_cast_only(ira, prev_type, cur_type, source_node, false).id == ConstCastResultIdOk) { |
| 9279 | continue; | 9297 | continue; |
| 9280 | } | 9298 | } |