From 76c277a9e766e7072b76badaec4edbcbda5594e6 Mon Sep 17 00:00:00 2001 From: Him188 Date: Thu, 10 Sep 2020 17:41:14 +0800 Subject: [PATCH] Fix compiler error --- .../net/mamoe/mirai/console/util/MessageScope.kt | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) 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) }