Make uin not final

This commit is contained in:
Him188 2020-01-29 19:19:22 +08:00
parent b8b1f4cc2a
commit 008b6e935d

View File

@ -13,6 +13,7 @@ import kotlin.coroutines.CoroutineContext
/*
* 泛型 N 不需要向外(接口)暴露.
*/
@UseExperimental(MiraiExperimentalAPI::class)
@MiraiInternalAPI
abstract class BotImpl<N : BotNetworkHandler> constructor(
account: BotAccount,
@ -25,8 +26,7 @@ abstract class BotImpl<N : BotNetworkHandler> constructor(
@Suppress("CanBePrimaryConstructorProperty") // for logger
final override val account: BotAccount = account
@UseExperimental(MiraiExperimentalAPI::class)
final override val uin: Long
override val uin: Long
get() = account.id
final override val logger: MiraiLogger = configuration.logger ?: DefaultLogger("Bot($uin)").also { configuration.logger = it }