diff --git a/backend/codegen/src/main/kotlin/net/mamoe/mirai/console/codegen/ValuesCodegen.kt b/backend/codegen/src/main/kotlin/net/mamoe/mirai/console/codegen/ValuesCodegen.kt index 4da6e25c1..018f7242e 100644 --- a/backend/codegen/src/main/kotlin/net/mamoe/mirai/console/codegen/ValuesCodegen.kt +++ b/backend/codegen/src/main/kotlin/net/mamoe/mirai/console/codegen/ValuesCodegen.kt @@ -264,7 +264,7 @@ sealed class Value : ReadWriteProperty { * 只引用这个对象, 而不跟踪其成员. * 仅适用于基础类型, 用于 mutable list/map 等情况; 或标注了 [Serializable] 的类. */ - abstract class DynamicReferenceValue internal constructor() : Value() + abstract class DynamicReferenceValue : Value() """ ) } \ No newline at end of file diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/setting/Setting.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/setting/Setting.kt index 87c75855e..0c42bc83d 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/setting/Setting.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/setting/Setting.kt @@ -59,6 +59,9 @@ abstract class Setting : SettingImpl() { override fun toString(): String = yamlForToString.stringify(this.serializer, this) } +/** + * 用于更新或保存这个 [Value] 的序列化器. + */ @Suppress("UNCHECKED_CAST") val T.serializer: KSerializer get() = kotlinSerializer as KSerializer