Minor, fix compiler warnings in kotlin-serialization-compiler

This commit is contained in:
Alexander Udalov
2020-11-24 17:56:10 +01:00
parent e0363788f4
commit d101f1b3a6
3 changed files with 6 additions and 6 deletions
@@ -116,7 +116,7 @@ interface IrBuilderExtension {
irInvoke(
dispatchReceiver,
callee,
args = valueArguments.toTypedArray(),
*valueArguments.toTypedArray(),
typeHint = returnTypeHint
).also { call -> typeArguments.forEachIndexed(call::putTypeArgument) }
@@ -590,7 +590,7 @@ interface IrBuilderExtension {
kType,
genericIndex
) { it, _ ->
val (prop, ir) = enclosingGenerator.localSerializersFieldsDescriptors[it]
val (_, ir) = enclosingGenerator.localSerializersFieldsDescriptors[it]
irGetField(irGet(dispatchReceiverParameter), ir.backingField!!)
}
@@ -80,7 +80,7 @@ class SerializerForInlineClassGenerator(
}, {
decoderClass.referenceMethod("${CallingConventions.decode}${it.elementMethodPrefix}") to listOf()
}, returnTypeHint = inlinedType)
val value = coerceToBox(actualCall, inlinedType, loadFunc.returnType)
val value = coerceToBox(actualCall, loadFunc.returnType)
+irReturn(value)
}
@@ -101,7 +101,7 @@ class SerializerForInlineClassGenerator(
// Compiler will elide these in corresponding inline class lowerings (when serialize/deserialize functions will be split in two)
private fun IrBlockBodyBuilder.coerceToBox(expression: IrExpression, propertyType: IrType, inlineClassBoxType: IrType): IrExpression =
private fun IrBlockBodyBuilder.coerceToBox(expression: IrExpression, inlineClassBoxType: IrType): IrExpression =
irInvoke(
null,
serializableIrClass.constructors.single { it.isPrimary }.symbol,
@@ -70,8 +70,8 @@ open class SerializerIrGenerator(
prop = generateSimplePropertyWithBackingField(desc, irClass)
// TODO: Do not use descriptors here
localSerializersFieldsDescriptors = findLocalSerializersFieldDescriptors().map { it ->
it to generateSimplePropertyWithBackingField(it, irClass)
localSerializersFieldsDescriptors = findLocalSerializersFieldDescriptors().map { descriptor ->
descriptor to generateSimplePropertyWithBackingField(descriptor, irClass)
}
}