diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallResolver.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallResolver.java index cf1c5e4cc0a..ca59ba1016a 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallResolver.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallResolver.java @@ -60,6 +60,7 @@ import static org.jetbrains.jet.lang.descriptors.ReceiverParameterDescriptor.NO_ import static org.jetbrains.jet.lang.diagnostics.Errors.*; import static org.jetbrains.jet.lang.resolve.BindingContext.NON_DEFAULT_EXPRESSION_DATA_FLOW; import static org.jetbrains.jet.lang.resolve.BindingContext.RESOLUTION_SCOPE; +import static org.jetbrains.jet.lang.resolve.BindingContext.RESOLVED_CALL; import static org.jetbrains.jet.lang.resolve.calls.CallResolverUtil.ResolveArgumentsMode.RESOLVE_FUNCTION_ARGUMENTS; import static org.jetbrains.jet.lang.resolve.calls.results.OverloadResolutionResults.Code.*; import static org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverValue.NO_RECEIVER; @@ -374,7 +375,9 @@ public class CallResolver { candidateResolver.checkValueArgumentTypes(callCandidateResolutionContext); return results; } - ResolvedCallImpl copy = CallResolverUtil.copy(resolvedCall, context); + ResolvedCallImpl copy = CallResolverUtil.copy(resolvedCall); + context.trace.record(RESOLVED_CALL, context.call.getCalleeExpression(), copy); + CallCandidateResolutionContext callCandidateResolutionContext = CallCandidateResolutionContext.createForCallBeingAnalyzed(copy, context, tracing); candidateResolver.completeTypeInferenceDependentOnExpectedTypeForCall(callCandidateResolutionContext, false); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallResolverUtil.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallResolverUtil.java index 3220c3fa0e6..dd7ecc049eb 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallResolverUtil.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallResolverUtil.java @@ -52,13 +52,13 @@ public class CallResolverUtil { private CallResolverUtil() {} - public static ResolvedCallImpl copy(@NotNull ResolvedCallImpl call, @NotNull CallResolutionContext context) { + public static ResolvedCallImpl copy(@NotNull ResolvedCallImpl call) { ResolutionCandidate candidate = ResolutionCandidate.create(call.getCandidateDescriptor(), call.getThisObject(), call.getReceiverArgument(), call.getExplicitReceiverKind(), call.isSafeCall()); - ResolvedCallImpl copy = ResolvedCallImpl.create(candidate, TraceUtil.DELEGATING_TRACE_STUB, call.getTracing(), call.getDataFlowInfoForArguments()); - context.trace.record(BindingContext.RESOLVED_CALL, context.call.getCalleeExpression(), copy); + ResolvedCallImpl copy = ResolvedCallImpl.create( + candidate, TraceUtil.DELEGATING_TRACE_STUB, call.getTracing(), call.getDataFlowInfoForArguments()); copy.addStatus(call.getStatus()); if (call.isDirty()) {