Files
swift-mirror/test/stdlib/ArrayDiagnostics.swift
Pavel Yaskevich ac2305e7f1 [ConstraintSystem] Increase impact of fixes for some conditional requirements
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.
2020-06-12 11:47:04 -07:00

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'}}
}