diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/linear.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/linear.kt index e73d3e922..e6bca704c 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/linear.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/linear.kt @@ -27,7 +27,7 @@ import kotlin.coroutines.EmptyCoroutineContext @MiraiExperimentalAPI suspend inline fun subscribingGet( timeoutMillis: Long = -1, - noinline filter: E.(E) -> R? + noinline filter: E.(E) -> R? // 不要 crossinline: crossinline 后 stacktrace 会不正常 ): R { require(timeoutMillis == -1L || timeoutMillis > 0) { "timeoutMillis must be -1 or > 0" } return subscribingGetOrNull(timeoutMillis, filter) ?: error("timeout subscribingGet") @@ -46,7 +46,7 @@ suspend inline fun subscribingGet( @MiraiExperimentalAPI suspend inline fun subscribingGetOrNull( timeoutMillis: Long = -1, - noinline filter: E.(E) -> R? + noinline filter: E.(E) -> R? // 不要 crossinline: crossinline 后 stacktrace 会不正常 ): R? { require(timeoutMillis == -1L || timeoutMillis > 0) { "timeoutMillis must be -1 or > 0" } var result: R? = null @@ -106,7 +106,7 @@ suspend inline fun subscribingGetOrNull( inline fun CoroutineScope.subscribingGetAsync( coroutineContext: CoroutineContext = EmptyCoroutineContext, timeoutMillis: Long = -1, - noinline filter: E.(E) -> R? + noinline filter: E.(E) -> R? // 不要 crossinline: crossinline 后 stacktrace 会不正常 ): Deferred = this.async(coroutineContext) { subscribingGet(timeoutMillis, filter) } \ No newline at end of file