From 381fd35e3e6bc0e9573690099f5d64073c5494ea Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Mon, 28 Oct 2013 16:38:56 +0400 Subject: [PATCH] do not store context in CallForImplicitInvoke --- .../jet/lang/resolve/calls/CallTransformer.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallTransformer.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallTransformer.java index 04899c5279f..2c9f868da02 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallTransformer.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallTransformer.java @@ -191,7 +191,7 @@ public class CallTransformer { final ResolvedCallWithTrace variableResolvedCall = (ResolvedCallWithTrace)context.candidateCall; - Call functionCall = new CallForImplicitInvoke(context, task, returnType); + Call functionCall = new CallForImplicitInvoke(context.receiverForVariableAsFunctionSecondCall, task, returnType); DelegatingBindingTrace variableCallTrace = context.candidateCall.getTrace(); BasicCallResolutionContext basicCallResolutionContext = BasicCallResolutionContext.create( @@ -212,22 +212,22 @@ public class CallTransformer { public static class CallForImplicitInvoke extends DelegatingCall { final Call outerCall; - final CallCandidateResolutionContext context; + final ReceiverValue receiverForVariableAsFunctionSecondCall; final ExpressionReceiver receiverFromVariable; final JetSimpleNameExpression invokeExpression; - private CallForImplicitInvoke(CallCandidateResolutionContext context, + private CallForImplicitInvoke(ReceiverValue receiverForVariableAsFunctionSecondCall, ResolutionTask task, JetType returnType) { super(task.call); this.outerCall = task.call; - this.context = context; + this.receiverForVariableAsFunctionSecondCall = receiverForVariableAsFunctionSecondCall; this.receiverFromVariable = new ExpressionReceiver(task.reference, returnType); this.invokeExpression = (JetSimpleNameExpression) JetPsiFactory.createExpression(task.call.getCallElement().getProject(), "invoke"); } @NotNull @Override public ReceiverValue getExplicitReceiver() { - return context.receiverForVariableAsFunctionSecondCall; + return receiverForVariableAsFunctionSecondCall; } @NotNull