From 6b4124895fae518351ffb5a35184488135c865bf Mon Sep 17 00:00:00 2001 From: Him188 Date: Tue, 23 Jun 2020 22:32:46 +0800 Subject: [PATCH] Simplify type inheritance for IntValueImpl --- .../net/mamoe/mirai/console/setting/internal/_Setting.value.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/setting/internal/_Setting.value.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/setting/internal/_Setting.value.kt index f0daa4bf7..4d01fbfe5 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/setting/internal/_Setting.value.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/setting/internal/_Setting.value.kt @@ -9,7 +9,6 @@ package net.mamoe.mirai.console.setting.internal -import kotlinx.serialization.KSerializer import kotlinx.serialization.builtins.serializer import net.mamoe.mirai.console.setting.SerializerAwareValue import net.mamoe.mirai.console.setting.Setting @@ -54,7 +53,7 @@ internal object BuiltInSerializerConstants { // TODO: 2020/6/21 CODEGEN internal fun Setting.valueImpl(default: Int): SerializerAwareValue { - return object : IntValueImpl(default), SerializerAwareValue, KSerializer { + return object : IntValueImpl(default) { override fun onChanged() = this@valueImpl.onValueChanged(this) } }