Skip to content

Commit f9c2cd1

Browse files
committed
Merge pull request swiftlang#804 from raylillywhite/patch-1
[stdlib] Add documentation for `===`
2 parents 0f11d92 + 4f90ba1 commit f9c2cd1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

stdlib/public/core/Policy.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ public protocol AnyObject : class {}
142142
/// - SeeAlso: `AnyObject`
143143
public typealias AnyClass = AnyObject.Type
144144

145+
/// Returns true iff `lhs` and `rhs` are references to the same object
146+
/// instance (in other words, are identical pointers).
147+
///
148+
/// - SeeAlso: `Equatable`, `==`
145149
@warn_unused_result
146150
public func === (lhs: AnyObject?, rhs: AnyObject?) -> Bool {
147151
switch (lhs, rhs) {
@@ -447,4 +451,3 @@ infix operator |= { associativity right precedence 90 assignment }
447451
// example of how this operator is used, and how its use can be hidden
448452
// from users.
449453
infix operator ~> { associativity left precedence 255 }
450-

0 commit comments

Comments
 (0)