Fix compilation

This commit is contained in:
Him188 2020-05-19 16:08:25 +08:00
parent a7eaf788ac
commit 52f5008379
4 changed files with 99 additions and 77 deletions

View File

@ -108,7 +108,8 @@ fun genAllValueImpl(): String = buildString {
): Mutable${number}${collectionName}Value { ): Mutable${number}${collectionName}Value {
var internalValue: Mutable${collectionName}<${number}> = default var internalValue: Mutable${collectionName}<${number}> = default
return object : Mutable${number}${collectionName}Value(), Mutable${collectionName}<${number}> by dynamicMutable${collectionName}({ internalValue }) { val delegt = dynamicMutable${collectionName}{ internalValue }
return object : Mutable${number}${collectionName}Value(), Mutable${collectionName}<${number}> by delegt {
override var value: Mutable${collectionName}<${number}> override var value: Mutable${collectionName}<${number}>
get() = internalValue get() = internalValue
set(new) { set(new) {
@ -118,7 +119,7 @@ fun genAllValueImpl(): String = buildString {
} }
} }
private inline val `this` get() = this private val outerThis get() = this
override val serializer: KSerializer<Mutable${collectionName}<${number}>> = object : KSerializer<Mutable${collectionName}<${number}>> { override val serializer: KSerializer<Mutable${collectionName}<${number}>> = object : KSerializer<Mutable${collectionName}<${number}>> {
private val delegate = ${collectionName}Serializer(${number}.serializer()) private val delegate = ${collectionName}Serializer(${number}.serializer())
@ -126,7 +127,7 @@ fun genAllValueImpl(): String = buildString {
override fun deserialize(decoder: Decoder): Mutable${collectionName}<${number}> { override fun deserialize(decoder: Decoder): Mutable${collectionName}<${number}> {
return delegate.deserialize(decoder).toMutable${collectionName}().observable { return delegate.deserialize(decoder).toMutable${collectionName}().observable {
onElementChanged(`this`) onElementChanged(outerThis)
} }
} }

View File

@ -32,7 +32,7 @@ dependencies {
compileAndRuntime("net.mamoe:mirai-core:${Versions.Mirai.core}") compileAndRuntime("net.mamoe:mirai-core:${Versions.Mirai.core}")
compileAndRuntime(kotlin("stdlib")) compileAndRuntime(kotlin("stdlib"))
api("net.mamoe.yamlkt:yamlkt:0.2.0") api("net.mamoe.yamlkt:yamlkt:0.3.0")
api("org.jsoup:jsoup:1.12.1") api("org.jsoup:jsoup:1.12.1")

View File

@ -53,7 +53,10 @@ internal fun <T : Any> Setting.valueImpl(
internalValue.shadowMap(transform = { it.value }, transformBack = { valueMapper(it) }) internalValue.shadowMap(transform = { it.value }, transformBack = { valueMapper(it) })
var shadowed: MutableList<T> = updateShadow() var shadowed: MutableList<T> = updateShadow()
return object : MutableListValue<T>(), MutableList<T> by dynamicMutableList({ shadowed }) {
val delegt = dynamicMutableList { shadowed }
return object : MutableListValue<T>(), MutableList<T> by delegt {
override var value: MutableList<Value<T>> override var value: MutableList<Value<T>>
get() = internalValue get() = internalValue
set(new) { set(new) {
@ -86,7 +89,8 @@ internal fun <T : Setting> Setting.valueImpl(
): MutableSettingListValue<T> { ): MutableSettingListValue<T> {
var internalValue: MutableList<T> = default var internalValue: MutableList<T> = default
return object : MutableSettingListValue<T>(), MutableList<T> by dynamicMutableList({ internalValue }) { val delegt = dynamicMutableList { internalValue }
return object : MutableSettingListValue<T>(), MutableList<T> by delegt {
override var value: MutableList<T> override var value: MutableList<T>
get() = internalValue get() = internalValue
set(new) { set(new) {
@ -118,7 +122,8 @@ internal fun <T : Setting> Setting.valueImpl(
): SettingListValue<T> { ): SettingListValue<T> {
var internalValue: List<T> = default var internalValue: List<T> = default
return object : SettingListValue<T>(), List<T> by dynamicList({ internalValue }) { val delegt = dynamicList { internalValue }
return object : SettingListValue<T>(), List<T> by delegt {
override var value: List<T> override var value: List<T>
get() = internalValue get() = internalValue
set(new) { set(new) {
@ -150,7 +155,8 @@ internal fun <T : Setting> Setting.valueImpl(
): SettingSetValue<T> { ): SettingSetValue<T> {
var internalValue: Set<T> = default var internalValue: Set<T> = default
return object : SettingSetValue<T>(), Set<T> by dynamicSet({ internalValue }) { val delegt = dynamicSet { internalValue }
return object : SettingSetValue<T>(), Set<T> by delegt {
override var value: Set<T> override var value: Set<T>
get() = internalValue get() = internalValue
set(new) { set(new) {
@ -182,7 +188,8 @@ internal fun <T : Setting> Setting.valueImpl(
): MutableSettingSetValue<T> { ): MutableSettingSetValue<T> {
var internalValue: MutableSet<T> = default var internalValue: MutableSet<T> = default
return object : MutableSettingSetValue<T>(), MutableSet<T> by dynamicMutableSet({ internalValue }) { val delegt = dynamicMutableSet { internalValue }
return object : MutableSettingSetValue<T>(), MutableSet<T> by delegt {
override var value: MutableSet<T> override var value: MutableSet<T>
get() = internalValue get() = internalValue
set(new) { set(new) {
@ -247,7 +254,9 @@ internal fun <T : Any> Setting.valueImpl(
internalValue.shadowMap(transform = { it.value }, transformBack = { valueMapper(it) }) internalValue.shadowMap(transform = { it.value }, transformBack = { valueMapper(it) })
var shadowed: MutableSet<T> = updateShadow() var shadowed: MutableSet<T> = updateShadow()
return object : MutableSetValue<T>(), MutableSet<T> by dynamicMutableSet({ shadowed }) {
val delegt = dynamicMutableSet { shadowed }
return object : MutableSetValue<T>(), MutableSet<T> by delegt {
override var value: MutableSet<Value<T>> override var value: MutableSet<Value<T>>
get() = internalValue get() = internalValue
set(new) { set(new) {
@ -293,20 +302,15 @@ internal fun <T : Any> Setting.valueImpl(default: T, clazz: KClass<out T>): Valu
} }
return object : DynamicReferenceValue<T>() { return object : DynamicReferenceValue<T>() {
override var value: T = default override var value: T = default
override val serializer: KSerializer<T> override val serializer: KSerializer<T> = object : KSerializer<T> {
get() = object : KSerializer<T> { override val descriptor: SerialDescriptor
override val descriptor: SerialDescriptor get() = YamlDynamicSerializer.descriptor
get() = YamlDynamicSerializer.descriptor
override fun deserialize(decoder: Decoder): T { override fun deserialize(decoder: Decoder): T =
return YamlDynamicSerializer.deserialize(decoder).smartCastPrimitive(clazz) YamlDynamicSerializer.deserialize(decoder).smartCastPrimitive(clazz)
}
@OptIn(ImplicitReflectionSerializer::class) override fun serialize(encoder: Encoder, value: T) = YamlDynamicSerializer.serialize(encoder, value)
override fun serialize(encoder: Encoder, value: T) { }
YamlDynamicSerializer.serialize(encoder, value)
}
}
} }
} }

View File

@ -7,7 +7,6 @@
* https://github.com/mamoe/mirai/blob/master/LICENSE * https://github.com/mamoe/mirai/blob/master/LICENSE
*/ */
package net.mamoe.mirai.console.setting package net.mamoe.mirai.console.setting
import kotlinx.serialization.Decoder import kotlinx.serialization.Decoder
@ -690,7 +689,8 @@ internal fun Setting.valueImpl(
): MutableIntListValue { ): MutableIntListValue {
var internalValue: MutableList<Int> = default var internalValue: MutableList<Int> = default
return object : MutableIntListValue(), MutableList<Int> by dynamicMutableList({ internalValue }) { val delegt = dynamicMutableList { internalValue }
return object : MutableIntListValue(), MutableList<Int> by delegt {
override var value: MutableList<Int> override var value: MutableList<Int>
get() = internalValue get() = internalValue
set(new) { set(new) {
@ -700,7 +700,7 @@ internal fun Setting.valueImpl(
} }
} }
private inline val `this` get() = this private val outerThis get() = this
override val serializer: KSerializer<MutableList<Int>> = object : KSerializer<MutableList<Int>> { override val serializer: KSerializer<MutableList<Int>> = object : KSerializer<MutableList<Int>> {
private val delegate = ListSerializer(Int.serializer()) private val delegate = ListSerializer(Int.serializer())
@ -708,7 +708,7 @@ internal fun Setting.valueImpl(
override fun deserialize(decoder: Decoder): MutableList<Int> { override fun deserialize(decoder: Decoder): MutableList<Int> {
return delegate.deserialize(decoder).toMutableList().observable { return delegate.deserialize(decoder).toMutableList().observable {
onElementChanged(`this`) onElementChanged(outerThis)
} }
} }
@ -725,7 +725,8 @@ internal fun Setting.valueImpl(
): MutableShortListValue { ): MutableShortListValue {
var internalValue: MutableList<Short> = default var internalValue: MutableList<Short> = default
return object : MutableShortListValue(), MutableList<Short> by dynamicMutableList({ internalValue }) { val delegt = dynamicMutableList { internalValue }
return object : MutableShortListValue(), MutableList<Short> by delegt {
override var value: MutableList<Short> override var value: MutableList<Short>
get() = internalValue get() = internalValue
set(new) { set(new) {
@ -735,7 +736,7 @@ internal fun Setting.valueImpl(
} }
} }
private inline val `this` get() = this private val outerThis get() = this
override val serializer: KSerializer<MutableList<Short>> = object : KSerializer<MutableList<Short>> { override val serializer: KSerializer<MutableList<Short>> = object : KSerializer<MutableList<Short>> {
private val delegate = ListSerializer(Short.serializer()) private val delegate = ListSerializer(Short.serializer())
@ -743,7 +744,7 @@ internal fun Setting.valueImpl(
override fun deserialize(decoder: Decoder): MutableList<Short> { override fun deserialize(decoder: Decoder): MutableList<Short> {
return delegate.deserialize(decoder).toMutableList().observable { return delegate.deserialize(decoder).toMutableList().observable {
onElementChanged(`this`) onElementChanged(outerThis)
} }
} }
@ -760,7 +761,8 @@ internal fun Setting.valueImpl(
): MutableByteListValue { ): MutableByteListValue {
var internalValue: MutableList<Byte> = default var internalValue: MutableList<Byte> = default
return object : MutableByteListValue(), MutableList<Byte> by dynamicMutableList({ internalValue }) { val delegt = dynamicMutableList { internalValue }
return object : MutableByteListValue(), MutableList<Byte> by delegt {
override var value: MutableList<Byte> override var value: MutableList<Byte>
get() = internalValue get() = internalValue
set(new) { set(new) {
@ -770,7 +772,7 @@ internal fun Setting.valueImpl(
} }
} }
private inline val `this` get() = this private val outerThis get() = this
override val serializer: KSerializer<MutableList<Byte>> = object : KSerializer<MutableList<Byte>> { override val serializer: KSerializer<MutableList<Byte>> = object : KSerializer<MutableList<Byte>> {
private val delegate = ListSerializer(Byte.serializer()) private val delegate = ListSerializer(Byte.serializer())
@ -778,7 +780,7 @@ internal fun Setting.valueImpl(
override fun deserialize(decoder: Decoder): MutableList<Byte> { override fun deserialize(decoder: Decoder): MutableList<Byte> {
return delegate.deserialize(decoder).toMutableList().observable { return delegate.deserialize(decoder).toMutableList().observable {
onElementChanged(`this`) onElementChanged(outerThis)
} }
} }
@ -795,7 +797,8 @@ internal fun Setting.valueImpl(
): MutableLongListValue { ): MutableLongListValue {
var internalValue: MutableList<Long> = default var internalValue: MutableList<Long> = default
return object : MutableLongListValue(), MutableList<Long> by dynamicMutableList({ internalValue }) { val delegt = dynamicMutableList { internalValue }
return object : MutableLongListValue(), MutableList<Long> by delegt {
override var value: MutableList<Long> override var value: MutableList<Long>
get() = internalValue get() = internalValue
set(new) { set(new) {
@ -805,7 +808,7 @@ internal fun Setting.valueImpl(
} }
} }
private inline val `this` get() = this private val outerThis get() = this
override val serializer: KSerializer<MutableList<Long>> = object : KSerializer<MutableList<Long>> { override val serializer: KSerializer<MutableList<Long>> = object : KSerializer<MutableList<Long>> {
private val delegate = ListSerializer(Long.serializer()) private val delegate = ListSerializer(Long.serializer())
@ -813,7 +816,7 @@ internal fun Setting.valueImpl(
override fun deserialize(decoder: Decoder): MutableList<Long> { override fun deserialize(decoder: Decoder): MutableList<Long> {
return delegate.deserialize(decoder).toMutableList().observable { return delegate.deserialize(decoder).toMutableList().observable {
onElementChanged(`this`) onElementChanged(outerThis)
} }
} }
@ -830,7 +833,8 @@ internal fun Setting.valueImpl(
): MutableFloatListValue { ): MutableFloatListValue {
var internalValue: MutableList<Float> = default var internalValue: MutableList<Float> = default
return object : MutableFloatListValue(), MutableList<Float> by dynamicMutableList({ internalValue }) { val delegt = dynamicMutableList { internalValue }
return object : MutableFloatListValue(), MutableList<Float> by delegt {
override var value: MutableList<Float> override var value: MutableList<Float>
get() = internalValue get() = internalValue
set(new) { set(new) {
@ -840,7 +844,7 @@ internal fun Setting.valueImpl(
} }
} }
private inline val `this` get() = this private val outerThis get() = this
override val serializer: KSerializer<MutableList<Float>> = object : KSerializer<MutableList<Float>> { override val serializer: KSerializer<MutableList<Float>> = object : KSerializer<MutableList<Float>> {
private val delegate = ListSerializer(Float.serializer()) private val delegate = ListSerializer(Float.serializer())
@ -848,7 +852,7 @@ internal fun Setting.valueImpl(
override fun deserialize(decoder: Decoder): MutableList<Float> { override fun deserialize(decoder: Decoder): MutableList<Float> {
return delegate.deserialize(decoder).toMutableList().observable { return delegate.deserialize(decoder).toMutableList().observable {
onElementChanged(`this`) onElementChanged(outerThis)
} }
} }
@ -865,7 +869,8 @@ internal fun Setting.valueImpl(
): MutableDoubleListValue { ): MutableDoubleListValue {
var internalValue: MutableList<Double> = default var internalValue: MutableList<Double> = default
return object : MutableDoubleListValue(), MutableList<Double> by dynamicMutableList({ internalValue }) { val delegt = dynamicMutableList { internalValue }
return object : MutableDoubleListValue(), MutableList<Double> by delegt {
override var value: MutableList<Double> override var value: MutableList<Double>
get() = internalValue get() = internalValue
set(new) { set(new) {
@ -875,7 +880,7 @@ internal fun Setting.valueImpl(
} }
} }
private inline val `this` get() = this private val outerThis get() = this
override val serializer: KSerializer<MutableList<Double>> = object : KSerializer<MutableList<Double>> { override val serializer: KSerializer<MutableList<Double>> = object : KSerializer<MutableList<Double>> {
private val delegate = ListSerializer(Double.serializer()) private val delegate = ListSerializer(Double.serializer())
@ -883,7 +888,7 @@ internal fun Setting.valueImpl(
override fun deserialize(decoder: Decoder): MutableList<Double> { override fun deserialize(decoder: Decoder): MutableList<Double> {
return delegate.deserialize(decoder).toMutableList().observable { return delegate.deserialize(decoder).toMutableList().observable {
onElementChanged(`this`) onElementChanged(outerThis)
} }
} }
@ -900,7 +905,8 @@ internal fun Setting.valueImpl(
): MutableBooleanListValue { ): MutableBooleanListValue {
var internalValue: MutableList<Boolean> = default var internalValue: MutableList<Boolean> = default
return object : MutableBooleanListValue(), MutableList<Boolean> by dynamicMutableList({ internalValue }) { val delegt = dynamicMutableList { internalValue }
return object : MutableBooleanListValue(), MutableList<Boolean> by delegt {
override var value: MutableList<Boolean> override var value: MutableList<Boolean>
get() = internalValue get() = internalValue
set(new) { set(new) {
@ -910,7 +916,7 @@ internal fun Setting.valueImpl(
} }
} }
private inline val `this` get() = this private val outerThis get() = this
override val serializer: KSerializer<MutableList<Boolean>> = object : KSerializer<MutableList<Boolean>> { override val serializer: KSerializer<MutableList<Boolean>> = object : KSerializer<MutableList<Boolean>> {
private val delegate = ListSerializer(Boolean.serializer()) private val delegate = ListSerializer(Boolean.serializer())
@ -918,7 +924,7 @@ internal fun Setting.valueImpl(
override fun deserialize(decoder: Decoder): MutableList<Boolean> { override fun deserialize(decoder: Decoder): MutableList<Boolean> {
return delegate.deserialize(decoder).toMutableList().observable { return delegate.deserialize(decoder).toMutableList().observable {
onElementChanged(`this`) onElementChanged(outerThis)
} }
} }
@ -935,7 +941,8 @@ internal fun Setting.valueImpl(
): MutableCharListValue { ): MutableCharListValue {
var internalValue: MutableList<Char> = default var internalValue: MutableList<Char> = default
return object : MutableCharListValue(), MutableList<Char> by dynamicMutableList({ internalValue }) { val delegt = dynamicMutableList { internalValue }
return object : MutableCharListValue(), MutableList<Char> by delegt {
override var value: MutableList<Char> override var value: MutableList<Char>
get() = internalValue get() = internalValue
set(new) { set(new) {
@ -945,7 +952,7 @@ internal fun Setting.valueImpl(
} }
} }
private inline val `this` get() = this private val outerThis get() = this
override val serializer: KSerializer<MutableList<Char>> = object : KSerializer<MutableList<Char>> { override val serializer: KSerializer<MutableList<Char>> = object : KSerializer<MutableList<Char>> {
private val delegate = ListSerializer(Char.serializer()) private val delegate = ListSerializer(Char.serializer())
@ -953,7 +960,7 @@ internal fun Setting.valueImpl(
override fun deserialize(decoder: Decoder): MutableList<Char> { override fun deserialize(decoder: Decoder): MutableList<Char> {
return delegate.deserialize(decoder).toMutableList().observable { return delegate.deserialize(decoder).toMutableList().observable {
onElementChanged(`this`) onElementChanged(outerThis)
} }
} }
@ -970,7 +977,8 @@ internal fun Setting.valueImpl(
): MutableStringListValue { ): MutableStringListValue {
var internalValue: MutableList<String> = default var internalValue: MutableList<String> = default
return object : MutableStringListValue(), MutableList<String> by dynamicMutableList({ internalValue }) { val delegt = dynamicMutableList { internalValue }
return object : MutableStringListValue(), MutableList<String> by delegt {
override var value: MutableList<String> override var value: MutableList<String>
get() = internalValue get() = internalValue
set(new) { set(new) {
@ -980,7 +988,7 @@ internal fun Setting.valueImpl(
} }
} }
private inline val `this` get() = this private val outerThis get() = this
override val serializer: KSerializer<MutableList<String>> = object : KSerializer<MutableList<String>> { override val serializer: KSerializer<MutableList<String>> = object : KSerializer<MutableList<String>> {
private val delegate = ListSerializer(String.serializer()) private val delegate = ListSerializer(String.serializer())
@ -988,7 +996,7 @@ internal fun Setting.valueImpl(
override fun deserialize(decoder: Decoder): MutableList<String> { override fun deserialize(decoder: Decoder): MutableList<String> {
return delegate.deserialize(decoder).toMutableList().observable { return delegate.deserialize(decoder).toMutableList().observable {
onElementChanged(`this`) onElementChanged(outerThis)
} }
} }
@ -1005,7 +1013,8 @@ internal fun Setting.valueImpl(
): MutableIntSetValue { ): MutableIntSetValue {
var internalValue: MutableSet<Int> = default var internalValue: MutableSet<Int> = default
return object : MutableIntSetValue(), MutableSet<Int> by dynamicMutableSet({ internalValue }) { val delegt = dynamicMutableSet { internalValue }
return object : MutableIntSetValue(), MutableSet<Int> by delegt {
override var value: MutableSet<Int> override var value: MutableSet<Int>
get() = internalValue get() = internalValue
set(new) { set(new) {
@ -1015,7 +1024,7 @@ internal fun Setting.valueImpl(
} }
} }
private inline val `this` get() = this private val outerThis get() = this
override val serializer: KSerializer<MutableSet<Int>> = object : KSerializer<MutableSet<Int>> { override val serializer: KSerializer<MutableSet<Int>> = object : KSerializer<MutableSet<Int>> {
private val delegate = SetSerializer(Int.serializer()) private val delegate = SetSerializer(Int.serializer())
@ -1023,7 +1032,7 @@ internal fun Setting.valueImpl(
override fun deserialize(decoder: Decoder): MutableSet<Int> { override fun deserialize(decoder: Decoder): MutableSet<Int> {
return delegate.deserialize(decoder).toMutableSet().observable { return delegate.deserialize(decoder).toMutableSet().observable {
onElementChanged(`this`) onElementChanged(outerThis)
} }
} }
@ -1040,7 +1049,8 @@ internal fun Setting.valueImpl(
): MutableShortSetValue { ): MutableShortSetValue {
var internalValue: MutableSet<Short> = default var internalValue: MutableSet<Short> = default
return object : MutableShortSetValue(), MutableSet<Short> by dynamicMutableSet({ internalValue }) { val delegt = dynamicMutableSet { internalValue }
return object : MutableShortSetValue(), MutableSet<Short> by delegt {
override var value: MutableSet<Short> override var value: MutableSet<Short>
get() = internalValue get() = internalValue
set(new) { set(new) {
@ -1050,7 +1060,7 @@ internal fun Setting.valueImpl(
} }
} }
private inline val `this` get() = this private val outerThis get() = this
override val serializer: KSerializer<MutableSet<Short>> = object : KSerializer<MutableSet<Short>> { override val serializer: KSerializer<MutableSet<Short>> = object : KSerializer<MutableSet<Short>> {
private val delegate = SetSerializer(Short.serializer()) private val delegate = SetSerializer(Short.serializer())
@ -1058,7 +1068,7 @@ internal fun Setting.valueImpl(
override fun deserialize(decoder: Decoder): MutableSet<Short> { override fun deserialize(decoder: Decoder): MutableSet<Short> {
return delegate.deserialize(decoder).toMutableSet().observable { return delegate.deserialize(decoder).toMutableSet().observable {
onElementChanged(`this`) onElementChanged(outerThis)
} }
} }
@ -1075,7 +1085,8 @@ internal fun Setting.valueImpl(
): MutableByteSetValue { ): MutableByteSetValue {
var internalValue: MutableSet<Byte> = default var internalValue: MutableSet<Byte> = default
return object : MutableByteSetValue(), MutableSet<Byte> by dynamicMutableSet({ internalValue }) { val delegt = dynamicMutableSet { internalValue }
return object : MutableByteSetValue(), MutableSet<Byte> by delegt {
override var value: MutableSet<Byte> override var value: MutableSet<Byte>
get() = internalValue get() = internalValue
set(new) { set(new) {
@ -1085,7 +1096,7 @@ internal fun Setting.valueImpl(
} }
} }
private inline val `this` get() = this private val outerThis get() = this
override val serializer: KSerializer<MutableSet<Byte>> = object : KSerializer<MutableSet<Byte>> { override val serializer: KSerializer<MutableSet<Byte>> = object : KSerializer<MutableSet<Byte>> {
private val delegate = SetSerializer(Byte.serializer()) private val delegate = SetSerializer(Byte.serializer())
@ -1093,7 +1104,7 @@ internal fun Setting.valueImpl(
override fun deserialize(decoder: Decoder): MutableSet<Byte> { override fun deserialize(decoder: Decoder): MutableSet<Byte> {
return delegate.deserialize(decoder).toMutableSet().observable { return delegate.deserialize(decoder).toMutableSet().observable {
onElementChanged(`this`) onElementChanged(outerThis)
} }
} }
@ -1110,7 +1121,8 @@ internal fun Setting.valueImpl(
): MutableLongSetValue { ): MutableLongSetValue {
var internalValue: MutableSet<Long> = default var internalValue: MutableSet<Long> = default
return object : MutableLongSetValue(), MutableSet<Long> by dynamicMutableSet({ internalValue }) { val delegt = dynamicMutableSet { internalValue }
return object : MutableLongSetValue(), MutableSet<Long> by delegt {
override var value: MutableSet<Long> override var value: MutableSet<Long>
get() = internalValue get() = internalValue
set(new) { set(new) {
@ -1120,7 +1132,7 @@ internal fun Setting.valueImpl(
} }
} }
private inline val `this` get() = this private val outerThis get() = this
override val serializer: KSerializer<MutableSet<Long>> = object : KSerializer<MutableSet<Long>> { override val serializer: KSerializer<MutableSet<Long>> = object : KSerializer<MutableSet<Long>> {
private val delegate = SetSerializer(Long.serializer()) private val delegate = SetSerializer(Long.serializer())
@ -1128,7 +1140,7 @@ internal fun Setting.valueImpl(
override fun deserialize(decoder: Decoder): MutableSet<Long> { override fun deserialize(decoder: Decoder): MutableSet<Long> {
return delegate.deserialize(decoder).toMutableSet().observable { return delegate.deserialize(decoder).toMutableSet().observable {
onElementChanged(`this`) onElementChanged(outerThis)
} }
} }
@ -1145,7 +1157,8 @@ internal fun Setting.valueImpl(
): MutableFloatSetValue { ): MutableFloatSetValue {
var internalValue: MutableSet<Float> = default var internalValue: MutableSet<Float> = default
return object : MutableFloatSetValue(), MutableSet<Float> by dynamicMutableSet({ internalValue }) { val delegt = dynamicMutableSet { internalValue }
return object : MutableFloatSetValue(), MutableSet<Float> by delegt {
override var value: MutableSet<Float> override var value: MutableSet<Float>
get() = internalValue get() = internalValue
set(new) { set(new) {
@ -1155,7 +1168,7 @@ internal fun Setting.valueImpl(
} }
} }
private inline val `this` get() = this private val outerThis get() = this
override val serializer: KSerializer<MutableSet<Float>> = object : KSerializer<MutableSet<Float>> { override val serializer: KSerializer<MutableSet<Float>> = object : KSerializer<MutableSet<Float>> {
private val delegate = SetSerializer(Float.serializer()) private val delegate = SetSerializer(Float.serializer())
@ -1163,7 +1176,7 @@ internal fun Setting.valueImpl(
override fun deserialize(decoder: Decoder): MutableSet<Float> { override fun deserialize(decoder: Decoder): MutableSet<Float> {
return delegate.deserialize(decoder).toMutableSet().observable { return delegate.deserialize(decoder).toMutableSet().observable {
onElementChanged(`this`) onElementChanged(outerThis)
} }
} }
@ -1180,7 +1193,8 @@ internal fun Setting.valueImpl(
): MutableDoubleSetValue { ): MutableDoubleSetValue {
var internalValue: MutableSet<Double> = default var internalValue: MutableSet<Double> = default
return object : MutableDoubleSetValue(), MutableSet<Double> by dynamicMutableSet({ internalValue }) { val delegt = dynamicMutableSet { internalValue }
return object : MutableDoubleSetValue(), MutableSet<Double> by delegt {
override var value: MutableSet<Double> override var value: MutableSet<Double>
get() = internalValue get() = internalValue
set(new) { set(new) {
@ -1190,7 +1204,7 @@ internal fun Setting.valueImpl(
} }
} }
private inline val `this` get() = this private val outerThis get() = this
override val serializer: KSerializer<MutableSet<Double>> = object : KSerializer<MutableSet<Double>> { override val serializer: KSerializer<MutableSet<Double>> = object : KSerializer<MutableSet<Double>> {
private val delegate = SetSerializer(Double.serializer()) private val delegate = SetSerializer(Double.serializer())
@ -1198,7 +1212,7 @@ internal fun Setting.valueImpl(
override fun deserialize(decoder: Decoder): MutableSet<Double> { override fun deserialize(decoder: Decoder): MutableSet<Double> {
return delegate.deserialize(decoder).toMutableSet().observable { return delegate.deserialize(decoder).toMutableSet().observable {
onElementChanged(`this`) onElementChanged(outerThis)
} }
} }
@ -1215,7 +1229,8 @@ internal fun Setting.valueImpl(
): MutableBooleanSetValue { ): MutableBooleanSetValue {
var internalValue: MutableSet<Boolean> = default var internalValue: MutableSet<Boolean> = default
return object : MutableBooleanSetValue(), MutableSet<Boolean> by dynamicMutableSet({ internalValue }) { val delegt = dynamicMutableSet { internalValue }
return object : MutableBooleanSetValue(), MutableSet<Boolean> by delegt {
override var value: MutableSet<Boolean> override var value: MutableSet<Boolean>
get() = internalValue get() = internalValue
set(new) { set(new) {
@ -1225,7 +1240,7 @@ internal fun Setting.valueImpl(
} }
} }
private inline val `this` get() = this private val outerThis get() = this
override val serializer: KSerializer<MutableSet<Boolean>> = object : KSerializer<MutableSet<Boolean>> { override val serializer: KSerializer<MutableSet<Boolean>> = object : KSerializer<MutableSet<Boolean>> {
private val delegate = SetSerializer(Boolean.serializer()) private val delegate = SetSerializer(Boolean.serializer())
@ -1233,7 +1248,7 @@ internal fun Setting.valueImpl(
override fun deserialize(decoder: Decoder): MutableSet<Boolean> { override fun deserialize(decoder: Decoder): MutableSet<Boolean> {
return delegate.deserialize(decoder).toMutableSet().observable { return delegate.deserialize(decoder).toMutableSet().observable {
onElementChanged(`this`) onElementChanged(outerThis)
} }
} }
@ -1250,7 +1265,8 @@ internal fun Setting.valueImpl(
): MutableCharSetValue { ): MutableCharSetValue {
var internalValue: MutableSet<Char> = default var internalValue: MutableSet<Char> = default
return object : MutableCharSetValue(), MutableSet<Char> by dynamicMutableSet({ internalValue }) { val delegt = dynamicMutableSet { internalValue }
return object : MutableCharSetValue(), MutableSet<Char> by delegt {
override var value: MutableSet<Char> override var value: MutableSet<Char>
get() = internalValue get() = internalValue
set(new) { set(new) {
@ -1260,7 +1276,7 @@ internal fun Setting.valueImpl(
} }
} }
private inline val `this` get() = this private val outerThis get() = this
override val serializer: KSerializer<MutableSet<Char>> = object : KSerializer<MutableSet<Char>> { override val serializer: KSerializer<MutableSet<Char>> = object : KSerializer<MutableSet<Char>> {
private val delegate = SetSerializer(Char.serializer()) private val delegate = SetSerializer(Char.serializer())
@ -1268,7 +1284,7 @@ internal fun Setting.valueImpl(
override fun deserialize(decoder: Decoder): MutableSet<Char> { override fun deserialize(decoder: Decoder): MutableSet<Char> {
return delegate.deserialize(decoder).toMutableSet().observable { return delegate.deserialize(decoder).toMutableSet().observable {
onElementChanged(`this`) onElementChanged(outerThis)
} }
} }
@ -1285,7 +1301,8 @@ internal fun Setting.valueImpl(
): MutableStringSetValue { ): MutableStringSetValue {
var internalValue: MutableSet<String> = default var internalValue: MutableSet<String> = default
return object : MutableStringSetValue(), MutableSet<String> by dynamicMutableSet({ internalValue }) { val delegt = dynamicMutableSet { internalValue }
return object : MutableStringSetValue(), MutableSet<String> by delegt {
override var value: MutableSet<String> override var value: MutableSet<String>
get() = internalValue get() = internalValue
set(new) { set(new) {
@ -1295,7 +1312,7 @@ internal fun Setting.valueImpl(
} }
} }
private inline val `this` get() = this private val outerThis get() = this
override val serializer: KSerializer<MutableSet<String>> = object : KSerializer<MutableSet<String>> { override val serializer: KSerializer<MutableSet<String>> = object : KSerializer<MutableSet<String>> {
private val delegate = SetSerializer(String.serializer()) private val delegate = SetSerializer(String.serializer())
@ -1303,7 +1320,7 @@ internal fun Setting.valueImpl(
override fun deserialize(decoder: Decoder): MutableSet<String> { override fun deserialize(decoder: Decoder): MutableSet<String> {
return delegate.deserialize(decoder).toMutableSet().observable { return delegate.deserialize(decoder).toMutableSet().observable {
onElementChanged(`this`) onElementChanged(outerThis)
} }
} }