mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-05 07:30:09 +08:00
Fix ambiguous NullMessageChain.equals
This commit is contained in:
parent
dad9c0b7b8
commit
86389306ee
@ -381,7 +381,7 @@ object EmptyMessageChain : MessageChain by MessageChainImplByIterable(emptyList(
|
||||
*/
|
||||
object NullMessageChain : MessageChain {
|
||||
override fun toString(): String = "NullMessageChain"
|
||||
override fun equals(other: Any?): Boolean = other == null
|
||||
override fun equals(other: Any?): Boolean = other === this
|
||||
override fun contains(sub: String): Boolean = error("accessing NullMessageChain")
|
||||
override fun followedBy(tail: Message): CombinedMessage = CombinedMessage(left = EmptyMessageChain, element = tail)
|
||||
override fun iterator(): MutableIterator<SingleMessage> = error("accessing NullMessageChain")
|
||||
|
Loading…
Reference in New Issue
Block a user