[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 newValueType = resultSubstitutor.substituteKeepAnnotations(valueType)
|
||||
|
||||
val newReceiverValue = receiver.value.replaceType(newValueType)
|
||||
|
||||
if (newReceiverValue != receiver.value) {
|
||||
if (valueType !== newValueType) {
|
||||
val newReceiverValue = receiver.value.replaceType(newValueType)
|
||||
functionDescriptor.setExtensionReceiverParameter(
|
||||
ReceiverParameterDescriptorImpl(receiver.containingDeclaration, newReceiverValue, receiver.annotations)
|
||||
)
|
||||
|
||||
-3
@@ -54,9 +54,6 @@ public class ExtensionReceiver extends AbstractReceiverValue implements Implicit
|
||||
@NotNull
|
||||
@Override
|
||||
public ReceiverValue replaceType(@NotNull KotlinType newType) {
|
||||
if (NewKotlinTypeChecker.INSTANCE.equalTypes(receiverType, newType)) {
|
||||
return this;
|
||||
}
|
||||
return new ExtensionReceiver(descriptor, newType, getOriginal());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user