File tree 3 files changed +24
-0
lines changed
3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,9 @@ internal protocol _SwiftNativeFoundationType : class {
75
75
76
76
func mutableCopy( with zone : NSZone ) -> Any
77
77
78
+ func hash( into hasher: inout Hasher )
78
79
var hashValue : Int { get }
80
+
79
81
var description : String { get }
80
82
var debugDescription : String { get }
81
83
@@ -115,6 +117,10 @@ extension _SwiftNativeFoundationType {
115
117
return _mapUnmanaged { ( $0 as NSObject ) . mutableCopy ( ) }
116
118
}
117
119
120
+ func hash( into hasher: inout Hasher ) {
121
+ _mapUnmanaged { hasher. combine ( $0) }
122
+ }
123
+
118
124
var hashValue : Int {
119
125
return _mapUnmanaged { return $0. hashValue }
120
126
}
Original file line number Diff line number Diff line change
1
+ //
2
+ // TestDateInterval.swift
3
+ // TestFoundation
4
+ //
5
+ // Created by Karoly Lorentey on 2019-04-10.
6
+ // Copyright © 2019 Apple. All rights reserved.
7
+ //
8
+
9
+ import Foundation
Original file line number Diff line number Diff line change
1
+ //
2
+ // TestMeasurement.swift
3
+ // TestFoundation
4
+ //
5
+ // Created by Karoly Lorentey on 2019-04-10.
6
+ // Copyright © 2019 Apple. All rights reserved.
7
+ //
8
+
9
+ import Foundation
You can’t perform that action at this time.
0 commit comments