Commits

gregomni committed 05ebb021ba5
Add a slightly less close than CC_OneArgumentMismatch closeness. Producing single argument mismatches involving generics causes some gross looking error messages if the generic mismatches get put into the same closeness bucket as non-generic mismatches. E.g. `var v71 = true + 1.0` used to produce `error: cannot convert value of type 'Bool' to expected argument type 'Double’`, but would now end up with `binary operator '+' cannot be applied to operands of type 'Bool' and 'Double’` `overloads for '+' exist with these partially matching parameter lists: (Double, Double), (T, T.Stride), (T.Stride, T)`. Resolve this by adding CC_OneGenericArgumentNearMismatch and CC_OneGenericArgumentMismatch, that are similar but ever so slightly not as close as a mismatch involving non-generic functions. This gets back the original error message in cases like the above, because there is only one declaration of `+` which partially matches and is non-generic, and the generic partial matches are now farther away. But now single arg mismatches and nearness work for single-archetype generic functions, as in the additions to the SR-69 test at the end of deduction.swift.