| ... | ... | @@ -17783,21 +17783,18 @@ fn resolvePeerTypes( |
| 17783 | 17783 | const chosen_child_ty = chosen_ty.childType(); |
| 17784 | 17784 | const candidate_child_ty = candidate_ty.childType(); |
| 17785 | 17785 | if (chosen_child_ty.zigTypeTag() == .Array and candidate_child_ty.zigTypeTag() == .Array) { |
| 17786 | | // If there is a sentinel, it must match |
| 17787 | | if (chosen_child_ty.sentinel()) |chosen_sentinel| { |
| 17788 | | if (candidate_child_ty.sentinel()) |candidate_sentinel| { |
| 17789 | | if (!chosen_sentinel.eql(candidate_sentinel, chosen_child_ty)) { |
| 17790 | | continue; |
| 17791 | | } |
| 17792 | | } else { |
| 17793 | | continue; |
| 17794 | | } |
| 17795 | | } |
| 17796 | | |
| 17797 | 17786 | // If we can cerce the element types, then we can do this. |
| 17798 | 17787 | const chosen_elem_ty = chosen_child_ty.elemType2(); |
| 17799 | 17788 | const candidate_elem_ty = candidate_child_ty.elemType2(); |
| 17800 | 17789 | if ((try sema.coerceInMemoryAllowed(block, candidate_elem_ty, chosen_elem_ty, false, target, src, src)) == .ok) { |
| 17790 | // If there is a sentinel, it must match |
| 17791 | if (chosen_child_ty.sentinel()) |chosen_sentinel| { |
| 17792 | if (candidate_child_ty.sentinel()) |candidate_sentinel| { |
| 17793 | if (!chosen_sentinel.eql(candidate_sentinel, chosen_elem_ty)) |
| 17794 | continue; |
| 17795 | } else continue; |
| 17796 | } |
| 17797 | |
| 17801 | 17798 | chosen = candidate; |
| 17802 | 17799 | chosen_i = candidate_i + 1; |
| 17803 | 17800 | |