[FE 1.0] Resolve collection literals through the new type inference infra
^KT-48961 In progress
This commit is contained in:
committed by
teamcity
parent
0070c234ce
commit
a542de715a
@@ -261,16 +261,21 @@ public class CallResolver {
|
|||||||
@NotNull Collection<FunctionDescriptor> functionDescriptors
|
@NotNull Collection<FunctionDescriptor> functionDescriptors
|
||||||
) {
|
) {
|
||||||
BasicCallResolutionContext callResolutionContext = BasicCallResolutionContext.create(context, call, CheckArgumentTypesMode.CHECK_VALUE_ARGUMENTS);
|
BasicCallResolutionContext callResolutionContext = BasicCallResolutionContext.create(context, call, CheckArgumentTypesMode.CHECK_VALUE_ARGUMENTS);
|
||||||
List<OldResolutionCandidate<FunctionDescriptor>> candidates = CollectionsKt.map(functionDescriptors, descriptor ->
|
|
||||||
OldResolutionCandidate.create(
|
|
||||||
call,
|
|
||||||
descriptor,
|
|
||||||
null,
|
|
||||||
ExplicitReceiverKind.NO_EXPLICIT_RECEIVER,
|
|
||||||
null));
|
|
||||||
|
|
||||||
return computeTasksFromCandidatesAndResolvedCall(
|
OverloadResolutionResults<FunctionDescriptor> resolutionResults = PSICallResolver.runResolutionAndInferenceForGivenDescriptors(
|
||||||
callResolutionContext, candidates, TracingStrategyImpl.create(expression, call));
|
callResolutionContext,
|
||||||
|
functionDescriptors,
|
||||||
|
TracingStrategyImpl.create(expression, call),
|
||||||
|
null,
|
||||||
|
null
|
||||||
|
);
|
||||||
|
|
||||||
|
if (resolutionResults.isSingleResult()) {
|
||||||
|
context.trace.record(BindingContext.RESOLVED_CALL, call, resolutionResults.getResultingCall());
|
||||||
|
context.trace.record(BindingContext.CALL, call.getCallElement(), call);
|
||||||
|
}
|
||||||
|
|
||||||
|
return resolutionResults;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|||||||
Reference in New Issue
Block a user