Commit 45f00b46 authored by Him188's avatar Him188

Fix VerifyError

parent 8cb8adc4
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
@file:Suppress( @file:Suppress(
"MemberVisibilityCanBePrivate", "unused", "EXPERIMENTAL_API_USAGE", "MemberVisibilityCanBePrivate", "unused", "EXPERIMENTAL_API_USAGE",
"NOTHING_TO_INLINE", "INVISIBLE_MEMBER", "INVISIBLE_REFERENCE", "NOTHING_TO_INLINE", "INVISIBLE_MEMBER", "INVISIBLE_REFERENCE",
"INAPPLICABLE_JVM_NAME", "WRONG_MODIFIER_CONTAINING_DECLARATION" "INAPPLICABLE_JVM_NAME"
) )
@file:JvmMultifileClass @file:JvmMultifileClass
@file:JvmName("MessageUtils") @file:JvmName("MessageUtils")
...@@ -166,7 +166,7 @@ interface Message { // must be interface. Don't consider any changes. ...@@ -166,7 +166,7 @@ interface Message { // must be interface. Don't consider any changes.
* *
* @sample net.mamoe.mirai.message.data.ContentEqualsTest * @sample net.mamoe.mirai.message.data.ContentEqualsTest
*/ */
final fun contentEquals(another: Message, ignoreCase: Boolean = false): Boolean = /* final */ fun contentEquals(another: Message, ignoreCase: Boolean = false): Boolean =
contentEqualsImpl(another, ignoreCase) contentEqualsImpl(another, ignoreCase)
/** /**
...@@ -178,7 +178,7 @@ interface Message { // must be interface. Don't consider any changes. ...@@ -178,7 +178,7 @@ interface Message { // must be interface. Don't consider any changes.
* *
* @sample net.mamoe.mirai.message.data.ContentEqualsTest * @sample net.mamoe.mirai.message.data.ContentEqualsTest
*/ */
final fun contentEquals(another: String, ignoreCase: Boolean = false): Boolean { /* final */ fun contentEquals(another: String, ignoreCase: Boolean = false): Boolean {
if (!this.contentToString().equals(another, ignoreCase = ignoreCase)) return false if (!this.contentToString().equals(another, ignoreCase = ignoreCase)) return false
return when (this) { return when (this) {
is SingleMessage -> true is SingleMessage -> true
...@@ -187,19 +187,19 @@ interface Message { // must be interface. Don't consider any changes. ...@@ -187,19 +187,19 @@ interface Message { // must be interface. Don't consider any changes.
} }
} }
final operator fun plus(another: MessageChain): MessageChain = this + another as Message /* final */ operator fun plus(another: MessageChain): MessageChain = this + another as Message
final operator fun plus(another: Message): MessageChain = this.followedBy(another) /* final */ operator fun plus(another: Message): MessageChain = this.followedBy(another)
final operator fun plus(another: SingleMessage): MessageChain = this.followedBy(another) /* final */ operator fun plus(another: SingleMessage): MessageChain = this.followedBy(another)
final operator fun plus(another: String): MessageChain = this.followedBy(another.toMessage()) /* final */ operator fun plus(another: String): MessageChain = this.followedBy(another.toMessage())
final operator fun plus(another: CharSequence): MessageChain = this.followedBy(another.toString().toMessage()) /* final */ operator fun plus(another: CharSequence): MessageChain = this.followedBy(another.toString().toMessage())
final operator fun plus(another: Iterable<Message>): MessageChain = /* final */ operator fun plus(another: Iterable<Message>): MessageChain =
another.fold(this, Message::plus).asMessageChain() another.fold(this, Message::plus).asMessageChain()
@JvmName("plusIterableString") @JvmName("plusIterableString")
final operator fun plus(another: Iterable<String>): MessageChain = /* final */ operator fun plus(another: Iterable<String>): MessageChain =
another.fold(this, Message::plus).asMessageChain() another.fold(this, Message::plus).asMessageChain()
final operator fun plus(another: Sequence<Message>): MessageChain = /* final */ operator fun plus(another: Sequence<Message>): MessageChain =
another.fold(this, Message::plus).asMessageChain() another.fold(this, Message::plus).asMessageChain()
} }
...@@ -312,7 +312,7 @@ interface MessageMetadata : SingleMessage { ...@@ -312,7 +312,7 @@ interface MessageMetadata : SingleMessage {
/** /**
* 返回空字符串 * 返回空字符串
*/ */
final override fun contentToString(): String = "" /* final */ override fun contentToString(): String = ""
} }
/** /**
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
@file:JvmMultifileClass @file:JvmMultifileClass
@file:JvmName("MessageUtils") @file:JvmName("MessageUtils")
@file:Suppress("WRONG_MODIFIER_CONTAINING_DECLARATION")
package net.mamoe.mirai.message.data package net.mamoe.mirai.message.data
...@@ -78,7 +77,7 @@ actual interface Image : Message, MessageContent { ...@@ -78,7 +77,7 @@ actual interface Image : Message, MessageContent {
@Deprecated(""" @Deprecated("""
不要自行实现 OnlineGroupImage, 它必须由协议模块实现, 否则会无法发送也无法解析. 不要自行实现 OnlineGroupImage, 它必须由协议模块实现, 否则会无法发送也无法解析.
""", level = DeprecationLevel.HIDDEN) """, level = DeprecationLevel.HIDDEN)
@Suppress( "PropertyName", "unused") @Suppress("WRONG_MODIFIER_CONTAINING_DECLARATION", "PropertyName", "unused")
@get:JvmSynthetic @get:JvmSynthetic
internal actual val DoNotImplementThisClass: Nothing? internal actual val DoNotImplementThisClass: Nothing?
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment