[ConstraintSystem] Don't increase a score for conditional requirement failures

Let's consider conditional requirement failure to mean that parent
conformance requirement wasn't satisfied and nothing more, that helps
to disambiguate certain situations and avoid filtering out conditional
failures.

Resolves: rdar://problem/64844584
This commit is contained in:
Pavel Yaskevich
2020-11-06 12:06:00 -08:00
parent 2e2792e3e3
commit 66fbdce2f8
7 changed files with 13 additions and 26 deletions

View File

@@ -4,5 +4,6 @@ class NotEquatable {}
func test_ArrayOfNotEquatableIsNotEquatable() {
var a = [ NotEquatable(), NotEquatable() ]
if a == a {} // expected-error {{referencing operator function '==' on 'Array' requires that 'NotEquatable' conform to 'Equatable'}}
// There is also a note attached to declaration - requirement from conditional conformance of '[NotEquatable]' to 'Equatable'
if a == a {} // expected-error {{operator function '==' requires that 'NotEquatable' conform to 'Equatable'}}
}