Parameter info to use resolve candidates instead of ReferenceVariantsHelper

#KT-6164 Fixed
 #KT-8931 Fixed
This commit is contained in:
Valentin Kipyatkov
2015-10-05 17:23:09 +03:00
parent 80bb1e7430
commit f27d24e640
16 changed files with 286 additions and 118 deletions
@@ -596,14 +596,15 @@ public class CallResolver {
@NotNull ResolutionTask<D, F> task,
@NotNull CallTransformer<D, F> callTransformer
) {
List<CallCandidateResolutionContext<D>> contexts = collectCallCandidateContext(task, callTransformer, EXIT_ON_FIRST_ERROR);
CandidateResolveMode mode = task.collectAllCandidates ? FULLY : EXIT_ON_FIRST_ERROR;
List<CallCandidateResolutionContext<D>> contexts = collectCallCandidateContext(task, callTransformer, mode);
boolean isSuccess = ContainerUtil.exists(contexts, new Condition<CallCandidateResolutionContext<D>>() {
@Override
public boolean value(CallCandidateResolutionContext<D> context) {
return context.candidateCall.getStatus().possibleTransformToSuccess();
}
});
if (!isSuccess) {
if (!isSuccess && mode == EXIT_ON_FIRST_ERROR) {
contexts = collectCallCandidateContext(task, callTransformer, FULLY);
}