| ... | ... | @@ -16993,6 +16993,18 @@ fn resolvePeerTypes( |
| 16993 | 16993 | const chosen_ty = sema.typeOf(chosen); |
| 16994 | 16994 | if (candidate_ty.eql(chosen_ty)) |
| 16995 | 16995 | continue; |
| 16996 | |
| 16997 | // If the candidate can coernce into our chosen type, we're done. |
| 16998 | // If the chosen type can coerce into the candidate, use that. |
| 16999 | if ((try sema.coerceInMemoryAllowed(block, chosen_ty, candidate_ty, false, target, src, src)) == .ok) { |
| 17000 | continue; |
| 17001 | } |
| 17002 | if ((try sema.coerceInMemoryAllowed(block, candidate_ty, chosen_ty, false, target, src, src)) == .ok) { |
| 17003 | chosen = candidate; |
| 17004 | chosen_i = candidate_i + 1; |
| 17005 | continue; |
| 17006 | } |
| 17007 | |
| 16996 | 17008 | const candidate_ty_tag = candidate_ty.zigTypeTag(); |
| 16997 | 17009 | const chosen_ty_tag = chosen_ty.zigTypeTag(); |
| 16998 | 17010 | |