File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -237,12 +237,10 @@ extension AnyKeyPath: Hashable {
237
237
if a === b {
238
238
return true
239
239
}
240
- /*
241
240
// Short-circuit differently-typed key paths
242
241
if type ( of: a) != type ( of: b) {
243
242
return false
244
243
}
245
- */
246
244
return a. withBuffer {
247
245
var aBuffer = $0
248
246
return b. withBuffer {
Original file line number Diff line number Diff line change @@ -327,6 +327,14 @@ keyPath.test("computed properties") {
327
327
}
328
328
}
329
329
330
+ keyPath. test ( " equality " ) {
331
+ expectNotEqual ( \Array < String > . isEmpty, \Substring . isEmpty)
332
+ expectNotEqual ( \Array < String > . isEmpty, \Substring . isEmpty)
333
+ expectNotEqual ( \Array < String > . isEmpty, \String . isEmpty)
334
+ expectNotEqual ( \Array < String > . isEmpty, \Substring . last)
335
+ expectNotEqual ( \Array < String > . isEmpty, \Array < Substring > . isEmpty)
336
+ }
337
+
330
338
class AB {
331
339
}
332
340
class ABC : AB , ABCProtocol {
You can’t perform that action at this time.
0 commit comments