Commits

gregomni committed e811a64af36
Further improvement of diagnoses on args to generic functions If the mismatched argument is on an archetype param, check to see whether the argument conforms to all of the protocols on the archetype, using a specific does-not-conform diagnosis if one or more protocols fail. Also added another closeness class `CC_GenericNonsubstitutableMismatch`, which happens when more than one argument is a mismatch, but all the failing arguments are of the same type and mismatch only because of substitutability. This closeness is farther away than normal `CC_ArgumentMismatch` so that if we note expected matches, we’ll prefer non-generic matches. But if this is the result, we can still produce the specific conforms-to-protocol diagnosis (since, in a sense, it’s only one type of argument that is wrong even though it is multiple arguments).