[NI] Fix determining type equality in replacing of extension receiver
This commit is contained in:
+2
-3
@@ -206,9 +206,8 @@ class ResolvedAtomCompleter(
|
|||||||
val valueType = receiver.value.type.unwrap()
|
val valueType = receiver.value.type.unwrap()
|
||||||
val newValueType = resultSubstitutor.substituteKeepAnnotations(valueType)
|
val newValueType = resultSubstitutor.substituteKeepAnnotations(valueType)
|
||||||
|
|
||||||
val newReceiverValue = receiver.value.replaceType(newValueType)
|
if (valueType !== newValueType) {
|
||||||
|
val newReceiverValue = receiver.value.replaceType(newValueType)
|
||||||
if (newReceiverValue != receiver.value) {
|
|
||||||
functionDescriptor.setExtensionReceiverParameter(
|
functionDescriptor.setExtensionReceiverParameter(
|
||||||
ReceiverParameterDescriptorImpl(receiver.containingDeclaration, newReceiverValue, receiver.annotations)
|
ReceiverParameterDescriptorImpl(receiver.containingDeclaration, newReceiverValue, receiver.annotations)
|
||||||
)
|
)
|
||||||
|
|||||||
-3
@@ -54,9 +54,6 @@ public class ExtensionReceiver extends AbstractReceiverValue implements Implicit
|
|||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public ReceiverValue replaceType(@NotNull KotlinType newType) {
|
public ReceiverValue replaceType(@NotNull KotlinType newType) {
|
||||||
if (NewKotlinTypeChecker.INSTANCE.equalTypes(receiverType, newType)) {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
return new ExtensionReceiver(descriptor, newType, getOriginal());
|
return new ExtensionReceiver(descriptor, newType, getOriginal());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user