Files
swift-mirror/test/object.swift
Dave Zarzycki ba7f0b0f2c Enable '==' and '!=' for class references
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
2012-12-31 01:43:58 +00:00

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