mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[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:
@@ -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'}}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user