[FE] Add getContextReceivers to CallableDescriptor interface

This commit is contained in:
Anastasiya Shadrina
2020-07-15 17:57:19 +07:00
committed by TeamCityServer
parent 7de8380ddf
commit a39fbd3822
61 changed files with 194 additions and 63 deletions
@@ -71,7 +71,7 @@ open class ParcelableResolveExtension : SyntheticResolveExtension {
val valueParameters = parameters.mapIndexed { index, (name, type) -> functionDescriptor.makeValueParameter(name, type, index) }
functionDescriptor.initialize(
null, classDescriptor.thisAsReceiverParameter, emptyList(), valueParameters,
null, classDescriptor.thisAsReceiverParameter, emptyList(), emptyList(), valueParameters,
returnType, modality, DescriptorVisibilities.PUBLIC)
return functionDescriptor
@@ -49,7 +49,7 @@ internal fun genClearCacheFunction(packageFragmentDescriptor: PackageFragmentDes
val unitType = packageFragmentDescriptor.builtIns.unitType
return function.initialize(
DescriptorFactory.createExtensionReceiverParameterForCallable(function, receiverType, Annotations.EMPTY),
null, emptyList(), emptyList(), unitType, Modality.FINAL, DescriptorVisibilities.PUBLIC
null, emptyList(), emptyList(), emptyList(), unitType, Modality.FINAL, DescriptorVisibilities.PUBLIC
)
}
@@ -123,7 +123,8 @@ private fun genProperty(
flexibleType,
emptyList<TypeParameterDescriptor>(),
null,
DescriptorFactory.createExtensionReceiverParameterForCallable(property, receiverType, Annotations.EMPTY)
DescriptorFactory.createExtensionReceiverParameterForCallable(property, receiverType, Annotations.EMPTY),
emptyList<ReceiverParameterDescriptor>()
)
val getter = PropertyGetterDescriptorImpl(