Actually account for case when both references refer to null
This commit is contained in:
parent
edd16768e3
commit
51ec99d8dd
@ -9,8 +9,9 @@ object ReferenceHashStrategy : Hash.Strategy<Any?> {
|
|||||||
if (a == null || b == null) return false
|
if (a == null || b == null) return false
|
||||||
|
|
||||||
if (a is Reference<*>) {
|
if (a is Reference<*>) {
|
||||||
if (b is Reference<*>) return a.get() != null && a.get() == b.get()
|
val ref = a.get()
|
||||||
return a.get() == b
|
if (b is Reference<*>) return ref != null && ref == b.get()
|
||||||
|
return ref == b
|
||||||
} else if (b is Reference<*>) {
|
} else if (b is Reference<*>) {
|
||||||
return b.get() == a
|
return b.get() == a
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user