Skip to content

Commit 985ce39

Browse files
committed
Conform ObjectIdentifier to CustomStringConvertible [SR-2014]
1 parent d39ad94 commit 985ce39

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

stdlib/public/core/Reflection.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ public struct ObjectIdentifier : Hashable, Comparable {
4040
}
4141
}
4242

43+
extension ObjectIdentifier : CustomStringConvertible {
44+
/// A textual representation of `self`.
45+
public var description: String {
46+
return "ObjectIdentifier(\(_rawPointerToString(_value)))"
47+
}
48+
}
49+
4350
public func <(lhs: ObjectIdentifier, rhs: ObjectIdentifier) -> Bool {
4451
return UInt(lhs) < UInt(rhs)
4552
}

0 commit comments

Comments
 (0)