diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/util/MessageScope.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/util/MessageScope.kt index cda7b83fb..a4ad3e1e1 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/util/MessageScope.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/util/MessageScope.kt @@ -22,7 +22,6 @@ import net.mamoe.mirai.console.command.CommandSender import net.mamoe.mirai.contact.Contact import net.mamoe.mirai.contact.User import net.mamoe.mirai.message.data.Message -import kotlin.internal.InlineOnly import kotlin.internal.LowPriorityInOverloadResolution /** @@ -623,27 +622,23 @@ public suspend fun Flow.toMessageScope(): MessageScope { // Flow { +internal fun MessageScope.asSequence(): Sequence { return if (this is CombinedScope) { - sequenceOf(this.first.asSequence(), this.second.asSequence()).flatten() + val a = this.first.asSequence() + val b = this.second.asSequence() // don't inline. fuck compilers + sequenceOf(a, b).flatten() } else sequenceOf(this) }