mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
14 lines
621 B
Swift
14 lines
621 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
class NotEquatable {}
|
|
|
|
func test_ArrayOfNotEquatableIsNotEquatable() {
|
|
var a = [ NotEquatable(), NotEquatable() ]
|
|
// FIXME: This is an awful error.
|
|
if a == a {} // expected-error {{'<Self where Self : Equatable> (Self.Type) -> (Self, Self) -> Bool' requires that 'NotEquatable' conform to 'Equatable'}}
|
|
// expected-error@-1{{type 'NotEquatable' does not conform to protocol 'Equatable'}}
|
|
// expected-note @-2 {{requirement specified as 'NotEquatable' : 'Equatable'}}
|
|
// expected-note@-3{{requirement from conditional conformance of '[NotEquatable]' to 'Equatable'}}
|
|
}
|
|
|