From 9f28764811679d9d4f9d39652d094409f699e120 Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Mon, 28 Jan 2013 18:36:14 +0400 Subject: [PATCH] do not repeat initialization of candidate call if the context is copied --- .../context/CallCandidateResolutionContext.java | 16 +++++++++++----- 1 file 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 075fca6839e..93ce5611569 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 @@ -41,18 +41,22 @@ public final class CallCandidateResolutionContext CallCandidateResolutionContext create( @NotNull ResolvedCallImpl candidateCall, @NotNull ResolutionTask task, @NotNull BindingTrace trace, @NotNull TracingStrategy tracing, @NotNull Call call) { - return new CallCandidateResolutionContext(candidateCall, tracing, trace, task.scope, call, task.expectedType, task.dataFlowInfo, task.namespacesAllowed); + return new CallCandidateResolutionContext(candidateCall, tracing, trace, task.scope, call, task.expectedType, + task.dataFlowInfo, task.namespacesAllowed, true); } public static CallCandidateResolutionContext create( @@ -64,7 +68,8 @@ public final class CallCandidateResolutionContext CallCandidateResolutionContext create( @NotNull BasicCallResolutionContext context, @NotNull TracingStrategy tracing, @NotNull ResolvedCallImpl candidateCall) { - return new CallCandidateResolutionContext(candidateCall, tracing, context.trace, context.scope, context.call, context.expectedType, context.dataFlowInfo, context.namespacesAllowed); + return new CallCandidateResolutionContext(candidateCall, tracing, context.trace, context.scope, context.call, + context.expectedType, context.dataFlowInfo, context.namespacesAllowed, true); } @Override @@ -75,7 +80,8 @@ public final class CallCandidateResolutionContext(candidateCall, tracing, trace, scope, call, expectedType, dataFlowInfo, namespacesAllowed); + return new CallCandidateResolutionContext(candidateCall, tracing, trace, scope, call, expectedType, dataFlowInfo, + namespacesAllowed, false); } @Override