From eaeb24280087d0e96a50a1d28b5428b99e846756 Mon Sep 17 00:00:00 2001 From: Him188 Date: Fri, 6 Mar 2020 10:21:01 +0800 Subject: [PATCH] Specify receiver to avoid being confusing --- .../kotlin/net.mamoe.mirai/event/subscribeMessages.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/subscribeMessages.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/subscribeMessages.kt index 61cea61ce..4d5a32f04 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/subscribeMessages.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/subscribeMessages.kt @@ -173,7 +173,7 @@ inline fun CoroutineScope.incoming( capacity: Int = Channel.UNLIMITED ): ReceiveChannel { return Channel(capacity).apply { - val listener = subscribeAlways(coroutineContext) { + val listener = this@incoming.subscribeAlways(coroutineContext) { send(this) } this.invokeOnClose {