mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-08 09:10:11 +08:00
Improve equals
This commit is contained in:
parent
9f7dec2643
commit
756e8b537e
@ -300,7 +300,7 @@ internal class MemberImpl(
|
|||||||
@Suppress("DuplicatedCode")
|
@Suppress("DuplicatedCode")
|
||||||
override fun equals(other: Any?): Boolean { // 不要删除. trust me
|
override fun equals(other: Any?): Boolean { // 不要删除. trust me
|
||||||
if (this === other) return true
|
if (this === other) return true
|
||||||
if (other !is Contact) return false
|
if (other !is Member) return false
|
||||||
if (this::class != other::class) return false
|
if (this::class != other::class) return false
|
||||||
return this.id == other.id && this.bot == other.bot
|
return this.id == other.id && this.bot == other.bot
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user