Account for case when both references refer to null

This commit is contained in:
DBotThePony 2023-08-21 15:49:04 +07:00
parent 93783a4210
commit dd2dab37a7
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -9,7 +9,7 @@ object ReferenceHashStrategy : Hash.Strategy<Any?> {
if (a == null || b == null) return false
if (a is Reference<*>) {
if (b is Reference<*>) return a.get() == b.get()
if (b is Reference<*>) return a.get() != null && a.get() == b.get()
return a.get() == b
} else if (b is Reference<*>) {
return b.get() == a