Removed duplication in MutableResolvedCall interface
'hasIncompleteTypeParameters()' is the same as 'getConstraintSystem() != null'
This commit is contained in:
@@ -190,7 +190,7 @@ public class CandidateResolver {
|
||||
) {
|
||||
MutableResolvedCall<D> resolvedCall = context.candidateCall;
|
||||
ConstraintSystem constraintSystem = resolvedCall.getConstraintSystem();
|
||||
if (!resolvedCall.hasIncompleteTypeParameters() || constraintSystem == null) return;
|
||||
if (constraintSystem == null) return;
|
||||
|
||||
// constraints for function literals
|
||||
// Value parameters
|
||||
@@ -337,7 +337,6 @@ public class CandidateResolver {
|
||||
|
||||
// Solution
|
||||
boolean hasContradiction = constraintSystem.getStatus().hasContradiction();
|
||||
candidateCall.setHasIncompleteTypeParameters(true);
|
||||
if (!hasContradiction) {
|
||||
return INCOMPLETE_TYPE_INFERENCE;
|
||||
}
|
||||
|
||||
-11
@@ -36,17 +36,6 @@ public interface MutableResolvedCall<D extends CallableDescriptor> extends Resol
|
||||
|
||||
void setStatusToSuccess();
|
||||
|
||||
/**
|
||||
* 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)
|
||||
*/
|
||||
//todo remove, replace with "typeArguments.isEmpty() && !typeParameters.isEmpty()"
|
||||
boolean hasIncompleteTypeParameters();
|
||||
|
||||
void setHasIncompleteTypeParameters(boolean hasIncompleteTypeParameters);
|
||||
|
||||
//todo remove: use value to parameter map status
|
||||
boolean isDirty();
|
||||
|
||||
|
||||
-11
@@ -87,7 +87,6 @@ public class ResolvedCallImpl<D extends CallableDescriptor> implements MutableRe
|
||||
private DelegatingBindingTrace trace;
|
||||
private TracingStrategy tracing;
|
||||
private ResolutionStatus status = UNKNOWN_STATUS;
|
||||
private boolean hasUnknownTypeParameters = false;
|
||||
private ConstraintSystem constraintSystem = null;
|
||||
private Boolean hasInferredReturnType = null;
|
||||
private boolean completed = false;
|
||||
@@ -126,16 +125,6 @@ public class ResolvedCallImpl<D extends CallableDescriptor> implements MutableRe
|
||||
status = ResolutionStatus.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasIncompleteTypeParameters() {
|
||||
return hasUnknownTypeParameters;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setHasIncompleteTypeParameters(boolean hasIncompleteTypeParameters) {
|
||||
this.hasUnknownTypeParameters = hasIncompleteTypeParameters;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public DelegatingBindingTrace getTrace() {
|
||||
|
||||
Reference in New Issue
Block a user