refactoring: removed unnecessary local variable
This commit is contained in:
+9
-2
@@ -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
|
||||
|
||||
+2
-3
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user