Refactoring: moved code
Moved check for not generic call to CandidateResolver
This commit is contained in:
@@ -411,14 +411,6 @@ public class CallResolver {
|
||||
ResolvedCallWithTrace<D> resolvedCall = results.getResultingCall();
|
||||
ResolvedCallImpl<D> callToCompleteInference = resolvedCall.getCallToCompleteTypeArgumentInference();
|
||||
|
||||
if (!callToCompleteInference.hasIncompleteTypeParameters()) {
|
||||
CallCandidateResolutionContext<D> callCandidateResolutionContext =
|
||||
CallCandidateResolutionContext.createForCallBeingAnalyzed(callToCompleteInference, context, tracing);
|
||||
candidateResolver.completeNestedCallsInference(callCandidateResolutionContext);
|
||||
candidateResolver.checkValueArgumentTypes(callCandidateResolutionContext);
|
||||
return results;
|
||||
}
|
||||
|
||||
CallCandidateResolutionContext<D> callCandidateResolutionContext =
|
||||
CallCandidateResolutionContext.createForCallBeingAnalyzed(callToCompleteInference, context, tracing);
|
||||
candidateResolver.completeTypeInferenceDependentOnExpectedTypeForCall(callCandidateResolutionContext, false);
|
||||
@@ -426,7 +418,7 @@ public class CallResolver {
|
||||
if (callToCompleteInference.getStatus().isSuccess()) {
|
||||
return OverloadResolutionResultsImpl.success(resolvedCall);
|
||||
}
|
||||
return OverloadResolutionResultsImpl.incompleteTypeInference(resolvedCall);
|
||||
return results;
|
||||
}
|
||||
|
||||
private static <F extends CallableDescriptor> void cacheResults(
|
||||
|
||||
@@ -221,7 +221,12 @@ public class CandidateResolver {
|
||||
boolean isInnerCall
|
||||
) {
|
||||
ResolvedCallImpl<D> resolvedCall = context.candidateCall;
|
||||
assert resolvedCall.hasIncompleteTypeParameters();
|
||||
if (!resolvedCall.hasIncompleteTypeParameters()) {
|
||||
completeNestedCallsInference(context);
|
||||
checkValueArgumentTypes(context);
|
||||
return resolvedCall.getResultingDescriptor().getReturnType();
|
||||
}
|
||||
|
||||
assert resolvedCall.getConstraintSystem() != null;
|
||||
|
||||
JetType unsubstitutedReturnType = resolvedCall.getCandidateDescriptor().getReturnType();
|
||||
|
||||
Reference in New Issue
Block a user