refactoring: removed unnecessary local variable

This commit is contained in:
Svetlana Isakova
2013-02-07 14:37:30 +04:00
parent fe66161352
commit f5df9d7dbf
2 changed files with 11 additions and 5 deletions
@@ -66,8 +66,15 @@ public final class CallCandidateResolutionContext<D extends CallableDescriptor>
public static <D extends CallableDescriptor> CallCandidateResolutionContext<D> createForCallBeingAnalyzed(
@NotNull ResolvedCallImpl<D> candidateCall, @NotNull BasicCallResolutionContext context, @NotNull TracingStrategy tracing
) {
return new CallCandidateResolutionContext<D>(candidateCall, tracing, context.trace, context.scope, context.call,
context.expectedType, context.dataFlowInfo, context.resolveMode, context.namespacesAllowed);
return createForCallBeingAnalyzed(candidateCall, context, context.call, context.resolveMode, tracing);
}
public static <D extends CallableDescriptor> CallCandidateResolutionContext<D> createForCallBeingAnalyzed(
@NotNull ResolvedCallImpl<D> candidateCall, @NotNull ResolutionContext context, @NotNull Call call,
@NotNull ResolveMode resolveMode, @NotNull TracingStrategy tracing
) {
return new CallCandidateResolutionContext<D>(candidateCall, tracing, context.trace, context.scope, call,
context.expectedType, context.dataFlowInfo, resolveMode, context.namespacesAllowed);
}
@Override
@@ -56,11 +56,10 @@ public class TypeInfoForCall {
JetTypeInfo typeInfo = JetTypeInfo.create(type, dataFlowInfo);
CallCandidateResolutionContext<FunctionDescriptor> callCandidateResolutionContext;
if (resolvedCall instanceof ResolvedCallImpl) {
BasicCallResolutionContext basicCallResolutionContext = BasicCallResolutionContext.create(
TRACE_STUB, context.scope, call, TypeUtils.NO_EXPECTED_TYPE, typeInfo.getDataFlowInfo(), resolveMode, context.namespacesAllowed);
//todo[ResolvedCallImpl]
callCandidateResolutionContext = CallCandidateResolutionContext.createForCallBeingAnalyzed(
(ResolvedCallImpl<FunctionDescriptor>) resolvedCall, basicCallResolutionContext, ((ResolvedCallImpl<FunctionDescriptor>) resolvedCall).getTracing());
(ResolvedCallImpl<FunctionDescriptor>) resolvedCall, context.replaceBindingTrace(TRACE_STUB),
call, resolveMode, ((ResolvedCallImpl<FunctionDescriptor>) resolvedCall).getTracing());
}
else {
callCandidateResolutionContext = null;