From 39895e58a60432bf769c5a9e6d1561f0ab66c016 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Wed, 23 Jun 2021 21:29:28 +0600 Subject: [PATCH] changelog upsert --- CHANGELOG.md | 2 ++ .../serialization/typed_serializer/TypedSerializer.kt | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bf3d09ab56..892f2c75e66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ * Add functionality for multiplatform working with files: * Main class for files `MPPFile` * Inline class for filenames work encapsulation `FileName` +* `FSM` + * Module inited and in preview state ## 0.5.12 diff --git a/serialization/typed_serializer/src/commonMain/kotlin/dev/inmo/micro_utils/serialization/typed_serializer/TypedSerializer.kt b/serialization/typed_serializer/src/commonMain/kotlin/dev/inmo/micro_utils/serialization/typed_serializer/TypedSerializer.kt index d1f75914f4c..9a54292e629 100644 --- a/serialization/typed_serializer/src/commonMain/kotlin/dev/inmo/micro_utils/serialization/typed_serializer/TypedSerializer.kt +++ b/serialization/typed_serializer/src/commonMain/kotlin/dev/inmo/micro_utils/serialization/typed_serializer/TypedSerializer.kt @@ -12,7 +12,7 @@ open class TypedSerializer( ) : KSerializer { protected val serializers = presetSerializers.toMutableMap() @InternalSerializationApi - override open val descriptor: SerialDescriptor = buildSerialDescriptor( + open override val descriptor: SerialDescriptor = buildSerialDescriptor( "TextSourceSerializer", SerialKind.CONTEXTUAL ) { @@ -21,7 +21,7 @@ open class TypedSerializer( } @InternalSerializationApi - override open fun deserialize(decoder: Decoder): T { + open override fun deserialize(decoder: Decoder): T { return decoder.decodeStructure(descriptor) { var type: String? = null lateinit var result: T @@ -50,7 +50,7 @@ open class TypedSerializer( } @InternalSerializationApi - override open fun serialize(encoder: Encoder, value: T) { + open override fun serialize(encoder: Encoder, value: T) { encoder.encodeStructure(descriptor) { val valueSerializer = value::class.serializer() val type = serializers.keys.first { serializers[it] == valueSerializer }