Correctly support nullability in type arguments for serializer<T>() intrinsic.
Nullability info should be added to TYPE_OF operation marker. Fixes https://github.com/Kotlin/kotlinx.serialization/issues/2265
This commit is contained in:
committed by
Space Team
parent
8cc9f911d5
commit
ef9074e24d
+2
-2
@@ -225,13 +225,13 @@ class SerializationJvmIrIntrinsicSupport(
|
||||
*
|
||||
* Operation detection in new compilers performed by voidMagicApiCall.
|
||||
*/
|
||||
private fun InstructionAdapter.putReifyMarkerIfNeeded(type: KotlinTypeMarker, intrinsicType: IntrinsicType): Boolean =
|
||||
private fun InstructionAdapter.putReifyMarkerIfNeeded(type: IrType, intrinsicType: IntrinsicType): Boolean =
|
||||
with(typeSystemContext) {
|
||||
val typeDescriptor = type.typeConstructor().getTypeParameterClassifier()
|
||||
if (typeDescriptor != null) { // need further reification
|
||||
ReifiedTypeInliner.putReifiedOperationMarkerIfNeeded(
|
||||
typeDescriptor,
|
||||
false,
|
||||
type.isMarkedNullable(),
|
||||
ReifiedTypeInliner.OperationKind.TYPE_OF,
|
||||
this@putReifyMarkerIfNeeded,
|
||||
typeSystemContext
|
||||
|
||||
Reference in New Issue
Block a user