mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-27 00:30:17 +08:00
Add supertype Extension for AbstractExtensionPoint
This commit is contained in:
parent
a10e48cc36
commit
4ed8948e94
@ -22,7 +22,7 @@ import kotlin.internal.LowPriorityInOverloadResolution
|
|||||||
import kotlin.reflect.KClass
|
import kotlin.reflect.KClass
|
||||||
|
|
||||||
@ConsoleExperimentalAPI
|
@ConsoleExperimentalAPI
|
||||||
public open class AbstractExtensionPoint<T : Any>(
|
public open class AbstractExtensionPoint<T : Extension>(
|
||||||
@ConsoleExperimentalAPI
|
@ConsoleExperimentalAPI
|
||||||
public val type: KClass<T>
|
public val type: KClass<T>
|
||||||
) {
|
) {
|
||||||
@ -110,6 +110,8 @@ internal fun <T : Any> AbstractExtensionPoint<T>.throwExtensionException(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal fun <T : Any> AbstractExtensionPoint<T>
|
||||||
|
|
||||||
internal inline fun <T : Any> AbstractExtensionPoint<T>.useExtensions(block: (extension: T) -> Unit): Unit =
|
internal inline fun <T : Any> AbstractExtensionPoint<T>.useExtensions(block: (extension: T) -> Unit): Unit =
|
||||||
withExtensions(block)
|
withExtensions(block)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user