mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-25 15:40:28 +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
|
||||
|
||||
@ConsoleExperimentalAPI
|
||||
public open class AbstractExtensionPoint<T : Any>(
|
||||
public open class AbstractExtensionPoint<T : Extension>(
|
||||
@ConsoleExperimentalAPI
|
||||
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 =
|
||||
withExtensions(block)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user