From f5df9d7dbfeb58958bf5ed72775f32015877dd89 Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Thu, 7 Feb 2013 14:37:30 +0400 Subject: [PATCH] refactoring: removed unnecessary local variable --- .../calls/context/CallCandidateResolutionContext.java | 11 +++++++++-- .../lang/resolve/calls/context/TypeInfoForCall.java | 5 ++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/context/CallCandidateResolutionContext.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/context/CallCandidateResolutionContext.java index 3e3e330fae2..7f317c1b998 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/context/CallCandidateResolutionContext.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/context/CallCandidateResolutionContext.java @@ -66,8 +66,15 @@ public final class CallCandidateResolutionContext public static CallCandidateResolutionContext createForCallBeingAnalyzed( @NotNull ResolvedCallImpl candidateCall, @NotNull BasicCallResolutionContext context, @NotNull TracingStrategy tracing ) { - return new CallCandidateResolutionContext(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 CallCandidateResolutionContext createForCallBeingAnalyzed( + @NotNull ResolvedCallImpl candidateCall, @NotNull ResolutionContext context, @NotNull Call call, + @NotNull ResolveMode resolveMode, @NotNull TracingStrategy tracing + ) { + return new CallCandidateResolutionContext(candidateCall, tracing, context.trace, context.scope, call, + context.expectedType, context.dataFlowInfo, resolveMode, context.namespacesAllowed); } @Override diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/context/TypeInfoForCall.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/context/TypeInfoForCall.java index e8636abd8bf..db6275fea46 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/context/TypeInfoForCall.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/context/TypeInfoForCall.java @@ -56,11 +56,10 @@ public class TypeInfoForCall { JetTypeInfo typeInfo = JetTypeInfo.create(type, dataFlowInfo); CallCandidateResolutionContext 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) resolvedCall, basicCallResolutionContext, ((ResolvedCallImpl) resolvedCall).getTracing()); + (ResolvedCallImpl) resolvedCall, context.replaceBindingTrace(TRACE_STUB), + call, resolveMode, ((ResolvedCallImpl) resolvedCall).getTracing()); } else { callCandidateResolutionContext = null;