[FE] Add context receivers getter to KtCallableDeclaration interface
This commit is contained in:
committed by
TeamCityServer
parent
d1fdc4d787
commit
7de8380ddf
@@ -960,6 +960,11 @@ public class DescriptorResolver {
|
||||
if (receiverTypeRef != null) {
|
||||
receiverType = typeResolver.resolveType(scopeForDeclarationResolutionWithTypeParameters, receiverTypeRef, trace, true);
|
||||
}
|
||||
|
||||
List<KtTypeReference> contextReceiverTypeRefs = variableDeclaration.getContextReceiverTypeReferences();
|
||||
for (KtTypeReference contextReceiverTypeRef: contextReceiverTypeRefs) {
|
||||
typeResolver.resolveType(scopeForDeclarationResolutionWithTypeParameters, contextReceiverTypeRef, trace, true);
|
||||
}
|
||||
}
|
||||
|
||||
ReceiverParameterDescriptor receiverDescriptor;
|
||||
|
||||
@@ -197,6 +197,9 @@ class FunctionDescriptorResolver(
|
||||
if (function is KtFunctionLiteral) expectedFunctionType.getReceiverType() else null
|
||||
}
|
||||
|
||||
function.contextReceiverTypeReferences.onEach {
|
||||
typeResolver.resolveType(headerScope, it, trace, true)
|
||||
}
|
||||
|
||||
val valueParameterDescriptors =
|
||||
createValueParameterDescriptors(function, functionDescriptor, headerScope, trace, expectedFunctionType, inferenceSession)
|
||||
|
||||
Reference in New Issue
Block a user