File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
krpc/krpc-core/src/commonMain/kotlin/kotlinx/rpc/krpc/internal Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import kotlinx.rpc.descriptor.RpcTypeKrpc
1010import kotlinx.rpc.internal.rpcInternalKClass
1111import kotlinx.rpc.internal.utils.InternalRpcApi
1212import kotlinx.serialization.*
13+ import kotlinx.serialization.builtins.nullable
1314import kotlinx.serialization.descriptors.SerialDescriptor
1415import kotlinx.serialization.descriptors.buildClassSerialDescriptor
1516import kotlinx.serialization.encoding.*
@@ -29,7 +30,7 @@ internal fun SerializersModule.buildContextualInternal(type: KType): KSerializer
2930 )
3031
3132 @Suppress(" UNCHECKED_CAST" )
32- return result as ? KSerializer <Any ?>
33+ return if (type.isMarkedNullable) result?.nullable else result as ? KSerializer <Any ?>
3334}
3435
3536private fun SerializersModule.buildContextual (type : KType ): KSerializer <Any ?> {
You can’t perform that action at this time.
0 commit comments