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 {
237237 if a === b {
238238 return true
239239 }
240- /*
241240 // Short-circuit differently-typed key paths
242241 if type ( of: a) != type ( of: b) {
243242 return false
244243 }
245- */
246244 return a. withBuffer {
247245 var aBuffer = $0
248246 return b. withBuffer {
Original file line number Diff line number Diff line change @@ -327,6 +327,14 @@ keyPath.test("computed properties") {
327327 }
328328}
329329
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+
330338class AB {
331339}
332340class ABC : AB , ABCProtocol {
You can’t perform that action at this time.
0 commit comments