File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -120,19 +120,19 @@ internal final class _SwiftValue : NSObject, NSCopying {
120
120
return ObjectIdentifier ( self ) . hashValue
121
121
}
122
122
123
- override func isEqual( _ object: Any ? ) -> Bool {
124
- guard let other = object as? NSObject else {
125
- return false
126
- }
127
- if let box = other as? _SwiftValue {
128
- if let otherHashable = box. value as? AnyHashable ,
129
- let hashable = value as? AnyHashable {
130
- return hashable == otherHashable
123
+ override func isEqual( _ value: Any ? ) -> Bool {
124
+ if let other = value as? _SwiftValue {
125
+ if self === other {
126
+ return true
131
127
}
132
- }
133
- if let otherHashable = other as? AnyHashable ,
134
- let hashable = value as? AnyHashable {
135
- return hashable == otherHashable
128
+ if let otherHashable = other. value as? AnyHashable ,
129
+ let hashable = self . value as? AnyHashable {
130
+ return otherHashable == hashable
131
+ }
132
+
133
+ } else if let otherHashable = value as? AnyHashable ,
134
+ let hashable = self . value as? AnyHashable {
135
+ return otherHashable == hashable
136
136
}
137
137
return false
138
138
}
You can’t perform that action at this time.
0 commit comments