small refactoring

removed unnecessary variable
added annotation
This commit is contained in:
Svetlana Isakova
2013-04-03 13:04:10 +04:00
parent 0de4b6890e
commit 2a36da9549
2 changed files with 4 additions and 4 deletions
@@ -135,14 +135,13 @@ public class CallResolverUtil {
}
public static boolean hasInferredReturnType(ResolvedCallWithTrace<?> call) {
boolean isKnownReturnType = true;
ResolvedCallImpl<?> callToComplete = call.getCallToCompleteTypeArgumentInference();
if (hasReturnTypeDependentOnNotInferredParams(callToComplete)) { isKnownReturnType = false; }
if (hasReturnTypeDependentOnNotInferredParams(callToComplete)) return false;
// Expected type mismatch was reported before as 'TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH'
ConstraintSystem constraintSystem = callToComplete.getConstraintSystem();
if (constraintSystem != null && constraintSystem.hasOnlyExpectedTypeMismatch()) { isKnownReturnType = false; }
return isKnownReturnType;
if (constraintSystem != null && constraintSystem.hasOnlyExpectedTypeMismatch()) return false;
return true;
}
@Nullable
@@ -216,6 +216,7 @@ public class CandidateResolver {
resolvedCall.setResultingSubstitutor(constraintSystem.getResultingSubstitutor());
}
@Nullable
public <D extends CallableDescriptor> JetType completeTypeInferenceDependentOnExpectedTypeForCall(
@NotNull CallCandidateResolutionContext<D> context,
boolean isInnerCall