[k1] add information about context receiver labels to ContextClassReceiver/ContextReceiver

This commit is contained in:
Ilya Kirillov
2022-06-30 17:50:30 +02:00
parent c1ec1d9d4c
commit 2f822ab4d9
12 changed files with 70 additions and 22 deletions
@@ -358,6 +358,11 @@ class MemberDeserializer(private val c: DeserializationContext) {
callableDescriptor: CallableDescriptor
): ReceiverParameterDescriptor? {
val contextReceiverType = deserializationContext.typeDeserializer.type(this)
return DescriptorFactory.createContextReceiverParameterForCallable(callableDescriptor, contextReceiverType, Annotations.EMPTY)
return DescriptorFactory.createContextReceiverParameterForCallable(
callableDescriptor,
contextReceiverType,
/* customLabelName = */ null/*todo store custom label name in metadata?*/,
Annotations.EMPTY
)
}
}
@@ -150,7 +150,12 @@ class DeserializedClassDescriptor(
val contextReceiverType = c.typeDeserializer.type(it)
ReceiverParameterDescriptorImpl(
thisAsReceiverParameter,
ContextClassReceiver(this, contextReceiverType, null),
ContextClassReceiver(
this,
contextReceiverType,
/* customLabelName = */ null/*todo store custom label name in metadata?*/,
null
),
Annotations.EMPTY
);
}