[FIR] Serialize context receivers using the correct local serializer
This leads to type ref referring to generic type variables being serialized correctly. When the type variable is declared on the member itself, it's written to typeParameterName, otherwise it's written to typeParameter. This is required for deserialization to work correctly. #KT-63227 Fixed
This commit is contained in:
committed by
Space Team
parent
fe94876d9a
commit
7da271bab8
+4
-4
@@ -546,9 +546,9 @@ class FirElementSerializer private constructor(
|
||||
for (contextReceiver in property.contextReceivers) {
|
||||
val typeRef = contextReceiver.typeRef
|
||||
if (useTypeTable()) {
|
||||
builder.addContextReceiverTypeId(typeId(typeRef))
|
||||
builder.addContextReceiverTypeId(local.typeId(typeRef))
|
||||
} else {
|
||||
builder.addContextReceiverType(typeProto(contextReceiver.typeRef))
|
||||
builder.addContextReceiverType(local.typeProto(contextReceiver.typeRef))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -633,9 +633,9 @@ class FirElementSerializer private constructor(
|
||||
for (contextReceiver in function.contextReceivers) {
|
||||
val typeRef = contextReceiver.typeRef
|
||||
if (useTypeTable()) {
|
||||
builder.addContextReceiverTypeId(typeId(typeRef))
|
||||
builder.addContextReceiverTypeId(local.typeId(typeRef))
|
||||
} else {
|
||||
builder.addContextReceiverType(typeProto(contextReceiver.typeRef))
|
||||
builder.addContextReceiverType(local.typeProto(contextReceiver.typeRef))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user