rename hasUnknownTypeParameters -> hasIncompleteTypeParameters

This commit is contained in:
Svetlana Isakova
2013-02-08 14:56:26 +04:00
parent 3014275982
commit c42c2e653b
6 changed files with 15 additions and 9 deletions
@@ -332,7 +332,7 @@ public class CallResolver {
ResolvedCallWithTrace<D> resolvedCall = (ResolvedCallWithTrace<D>) results.getResultingCall();
//todo[ResolvedCallImpl]
if (!(resolvedCall instanceof ResolvedCallImpl)) return results;
if (!resolvedCall.hasUnknownTypeParameters()) {
if (!resolvedCall.hasIncompleteTypeParameters()) {
CallCandidateResolutionContext<D> callCandidateResolutionContext =
CallCandidateResolutionContext.createForCallBeingAnalyzed((ResolvedCallImpl<D>) resolvedCall, context, tracing);
candidateResolver.completeNestedCallsInference(callCandidateResolutionContext);
@@ -65,7 +65,7 @@ public class CallResolverUtil {
if (call.isDirty()) {
copy.argumentHasNoType();
}
copy.setHasUnknownTypeParameters(call.hasUnknownTypeParameters());
copy.setHasUnknownTypeParameters(call.hasIncompleteTypeParameters());
ConstraintSystem constraintSystem = call.getConstraintSystem();
if (constraintSystem != null) {
copy.setConstraintSystem(constraintSystem.copy());
@@ -193,7 +193,7 @@ public class CandidateResolver {
CallCandidateResolutionContext<D> context
) {
ResolvedCallImpl<D> resolvedCall = context.candidateCall;
assert resolvedCall.hasUnknownTypeParameters();
assert resolvedCall.hasIncompleteTypeParameters();
ConstraintSystem constraintSystem = resolvedCall.getConstraintSystem();
assert constraintSystem != null;
@@ -217,7 +217,7 @@ public class CandidateResolver {
boolean isInnerCall
) {
ResolvedCallImpl<D> resolvedCall = context.candidateCall;
assert resolvedCall.hasUnknownTypeParameters();
assert resolvedCall.hasIncompleteTypeParameters();
D descriptor = resolvedCall.getCandidateDescriptor();
ConstraintSystem constraintSystem = resolvedCall.getConstraintSystem();
assert constraintSystem != null;
@@ -297,7 +297,7 @@ public class CandidateResolver {
CallCandidateResolutionContext<FunctionDescriptor> contextForArgument =
storedContextForArgument.replaceResolveMode(ResolveMode.TOP_LEVEL_CALL).replaceBindingTrace(context.trace).replaceExpectedType(expectedType);
if (contextForArgument.candidateCall.hasUnknownTypeParameters()) {
if (contextForArgument.candidateCall.hasIncompleteTypeParameters()) {
completeTypeInferenceDependentOnExpectedTypeForCall(contextForArgument, true);
}
else {
@@ -109,7 +109,7 @@ public class ResolvedCallImpl<D extends CallableDescriptor> implements ResolvedC
}
@Override
public boolean hasUnknownTypeParameters() {
public boolean hasIncompleteTypeParameters() {
return hasUnknownTypeParameters;
}
@@ -26,7 +26,13 @@ public interface ResolvedCallWithTrace<D extends CallableDescriptor> extends Res
@NotNull
ResolutionStatus getStatus();
boolean hasUnknownTypeParameters();
/**
* Resolved call can have incomplete type parameters
* if ResolutionStatus is INCOMPLETE_TYPE_INFERENCE (might be completed successfully)
* or OTHER_ERROR (cannot be completed successfully, but if there's only one candidate, should be completed anyway).
* @return true if resolved call has unknown type parameters (inference is incomplete)
*/
boolean hasIncompleteTypeParameters();
boolean isDirty();
@@ -129,7 +129,7 @@ public class VariableAsFunctionResolvedCall implements ResolvedCallWithTrace<Fun
}
@Override
public boolean hasUnknownTypeParameters() {
return variableCall.hasUnknownTypeParameters();
public boolean hasIncompleteTypeParameters() {
return variableCall.hasIncompleteTypeParameters();
}
}