mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
If there is a conditional requirement failure associated with member/function reference used in a call let's increase a score of a fix for such failure because it renders member/function unreachable in current context or with a given set of arguments.
9 lines
293 B
Swift
9 lines
293 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
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'}}
|
|
}
|