mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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
10 lines
398 B
Swift
10 lines
398 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
class NotEquatable {}
|
|
|
|
func test_ArrayOfNotEquatableIsNotEquatable() {
|
|
var a = [ NotEquatable(), NotEquatable() ]
|
|
// 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'}}
|
|
}
|