Substitute lambda's receiver type during completion including the builder inference stub variables substitution
^KT-42175 Fixed
This commit is contained in:
+8
-1
@@ -21,10 +21,12 @@ import org.jetbrains.kotlin.descriptors.DeclarationDescriptor;
|
||||
import org.jetbrains.kotlin.descriptors.ReceiverParameterDescriptor;
|
||||
import org.jetbrains.kotlin.descriptors.annotations.Annotations;
|
||||
import org.jetbrains.kotlin.resolve.scopes.receivers.ReceiverValue;
|
||||
import org.jetbrains.kotlin.types.KotlinType;
|
||||
import org.jetbrains.kotlin.types.typeUtil.TypeUtilsKt;
|
||||
|
||||
public class ReceiverParameterDescriptorImpl extends AbstractReceiverParameterDescriptor {
|
||||
private final DeclarationDescriptor containingDeclaration;
|
||||
private final ReceiverValue value;
|
||||
private ReceiverValue value;
|
||||
|
||||
public ReceiverParameterDescriptorImpl(
|
||||
@NotNull DeclarationDescriptor containingDeclaration,
|
||||
@@ -53,4 +55,9 @@ public class ReceiverParameterDescriptorImpl extends AbstractReceiverParameterDe
|
||||
public ReceiverParameterDescriptor copy(@NotNull DeclarationDescriptor newOwner) {
|
||||
return new ReceiverParameterDescriptorImpl(newOwner, value, getAnnotations());
|
||||
}
|
||||
|
||||
public void setOutType(@NotNull KotlinType outType) {
|
||||
assert TypeUtilsKt.shouldBeSubstituted(this.value.getType());
|
||||
this.value = value.replaceType(outType);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user