mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This may not be how we want to implement class equality checks in the long run, but in the short term this is _very_ handy. See also: <rdar://problem/12939898> ER: formalize root classes This also removes support for greater-than/less-than on Vectors, which makes no sense given that this has everything to do with the randomness of the memory allocator and nothing intrinsic about Vectors or class references in general. Swift SVN r3628
19 lines
260 B
Swift
19 lines
260 B
Swift
// RUN: %swift %s -i | FileCheck %s
|
|
|
|
func test() {
|
|
var d1 = new Dictionary
|
|
var d2 = new Dictionary
|
|
var d1_alias = d1
|
|
if d1 != d2 {
|
|
println("good")
|
|
}
|
|
if d1 == d1_alias {
|
|
println("also good")
|
|
}
|
|
}
|
|
|
|
test()
|
|
|
|
// CHECK: good
|
|
// CHECK: also good
|