Rename: this object, receiver argument -> dispatch receiver, extension receiver

This commit is contained in:
Svetlana Isakova
2014-09-29 21:09:07 +04:00
parent 1d2d2f4845
commit 20f3403c80
185 changed files with 681 additions and 687 deletions
@@ -214,7 +214,7 @@ public class DescriptorSerializer {
builder.addTypeParameter(local.typeParameter(typeParameterDescriptor));
}
ReceiverParameterDescriptor receiverParameter = descriptor.getReceiverParameter();
ReceiverParameterDescriptor receiverParameter = descriptor.getExtensionReceiverParameter();
if (receiverParameter != null) {
builder.setReceiverType(local.type(receiverParameter.getType()));
}
@@ -83,7 +83,7 @@ public class MemberDeserializer {
property.setType(
local.getTypeDeserializer().type(proto.getReturnType()),
typeParameters,
getExpectedThisObject(),
getDispatchReceiverParameter(),
local.getTypeDeserializer().typeOrNull(proto.hasReceiverType() ? proto.getReceiverType() : null)
);
@@ -161,7 +161,7 @@ public class MemberDeserializer {
DeserializationContextWithTypes local = context.childContext(function, proto.getTypeParameterList(), typeParameters);
function.initialize(
local.getTypeDeserializer().typeOrNull(proto.hasReceiverType() ? proto.getReceiverType() : null),
getExpectedThisObject(),
getDispatchReceiverParameter(),
typeParameters,
local.getDeserializer().valueParameters(proto, AnnotatedCallableKind.FUNCTION),
local.getTypeDeserializer().type(proto.getReturnType()),
@@ -172,7 +172,7 @@ public class MemberDeserializer {
}
@Nullable
private ReceiverParameterDescriptor getExpectedThisObject() {
private ReceiverParameterDescriptor getDispatchReceiverParameter() {
DeclarationDescriptor containingDeclaration = context.getContainingDeclaration();
return containingDeclaration instanceof ClassDescriptor
? ((ClassDescriptor) containingDeclaration).getThisAsReceiverParameter() : null;