From 008b6e935d93299e0a85676782c7ecded818e6e6 Mon Sep 17 00:00:00 2001 From: Him188 Date: Wed, 29 Jan 2020 19:19:22 +0800 Subject: [PATCH] Make uin not final --- mirai-core/src/commonMain/kotlin/net.mamoe.mirai/BotImpl.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/BotImpl.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/BotImpl.kt index 7f958fd05..537465380 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/BotImpl.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/BotImpl.kt @@ -13,6 +13,7 @@ import kotlin.coroutines.CoroutineContext /* * 泛型 N 不需要向外(接口)暴露. */ +@UseExperimental(MiraiExperimentalAPI::class) @MiraiInternalAPI abstract class BotImpl constructor( account: BotAccount, @@ -25,8 +26,7 @@ abstract class BotImpl 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 }