1
0
mirror of https://github.com/mamoe/mirai.git synced 2025-04-25 21:23:55 +08:00

Fix: Add parentScope for (ListenerHost&CoroutineScope).registerTo

This commit is contained in:
Him188 2020-12-31 23:28:01 +08:00
parent c9cc29d1d4
commit 68729cdcba

View File

@ -248,7 +248,7 @@ public class ExceptionInEventHandlerException(
@JvmSynthetic
// T 通常可以是 SimpleListenerHost
public inline fun <T> T.registerTo(eventChannel: EventChannel<*>): Unit
where T : CoroutineScope, T : ListenerHost = eventChannel.registerListenerHost(this)
where T : CoroutineScope, T : ListenerHost = eventChannel.parentScope(this).registerListenerHost(this)
@Deprecated(