Update extension receivers on deep IR copy.
This commit is contained in:
committed by
alexander-gorshenev
parent
8d2c6e4878
commit
6a23af0f04
+7
@@ -125,6 +125,9 @@ internal class DeepCopyIrTreeWithDescriptors(val targetDescriptor: DeclarationDe
|
||||
if (oldDescriptor !is PropertyAccessorDescriptor) { // Property accessors are copied along with their property.
|
||||
val newDescriptor = copyFunctionDescriptor(oldDescriptor)
|
||||
descriptorSubstituteMap[oldDescriptor] = newDescriptor
|
||||
oldDescriptor.extensionReceiverParameter?.let{
|
||||
descriptorSubstituteMap[it] = newDescriptor.extensionReceiverParameter!!
|
||||
}
|
||||
}
|
||||
super.visitFunction(declaration)
|
||||
}
|
||||
@@ -243,6 +246,10 @@ internal class DeepCopyIrTreeWithDescriptors(val targetDescriptor: DeclarationDe
|
||||
oldDescriptor.setter?.let {
|
||||
descriptorSubstituteMap[it] = newDescriptor.setter!!
|
||||
}
|
||||
oldDescriptor.extensionReceiverParameter?.let{
|
||||
descriptorSubstituteMap[it] = newDescriptor.extensionReceiverParameter!!
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------//
|
||||
|
||||
Reference in New Issue
Block a user