Files
swift-mirror/test/stdlib/ArrayDiagnostics.swift
Dmitri Hrybenko 04e9f63483 stdlib/Array: add a test that arrays of non-Equatable elements are not
comparable with ==


Swift SVN r18333
2014-05-18 17:25:35 +00:00

10 lines
262 B
Swift

// RUN: %swift %s -parse -verify
class NotEquatable {}
func test_ArrayOfNotEquatableIsNotEquatable() {
var a = [ NotEquatable(), NotEquatable() ]
if a == a {} // expected-error {{could not find an overload for '==' that accepts the supplied arguments}}
}