Possible fix of EA-34996

This commit is contained in:
Svetlana Isakova
2012-05-11 17:08:20 +04:00
parent aa4252462f
commit fddd9eff57
2 changed files with 3 additions and 5 deletions
@@ -328,11 +328,7 @@ public class CallResolver {
// We have some candidates that failed for some reason
// And we have a suspect: the function literal argument
// Now, we try to remove this argument and see if it helps
Collection<ResolutionCandidate<D>> newCandidates = Lists.newArrayList();
for (ResolutionCandidate<D> candidate : task.getCandidates()) {
newCandidates.add(ResolutionCandidate.create(candidate.getDescriptor(), candidate.isSafeCall())); //todo check receivers are not necessary
}
ResolutionTask<D, F> newContext = new ResolutionTask<D, F>(newCandidates, task.reference, TemporaryBindingTrace.create(task.trace), task.scope, new DelegatingCall(task.call) {
ResolutionTask<D, F> newContext = new ResolutionTask<D, F>(task.getCandidates(), task.reference, TemporaryBindingTrace.create(task.trace), task.scope, new DelegatingCall(task.call) {
@NotNull
@Override
public List<JetExpression> getFunctionLiteralArguments() {
@@ -222,6 +222,8 @@ import static org.jetbrains.jet.lang.resolve.calls.ValueArgumentsToParametersMap
status = ERROR;
}
assert (candidateCall.getThisObject().exists() == candidateCall.getResultingDescriptor().getExpectedThisObject().exists()) : "Shouldn't happen because of TaskPrioritizer: " + candidateCall.getCandidateDescriptor();
return status;
}