diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallExpressionResolver.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallExpressionResolver.java index 4bfc6eb6746..ecdd2817e33 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallExpressionResolver.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CallExpressionResolver.java @@ -311,7 +311,7 @@ public class CallExpressionResolver { } JetType type = functionDescriptor.getReturnType(); - return JetTypeInfo.create(type, resolvedCall.getDataFlowInfo()); + return JetTypeInfo.create(type, resolvedCall.getDataFlowInfoForArguments().getResultInfo()); } JetExpression calleeExpression = callExpression.getCalleeExpression(); 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 f91fe310f89..4409476c6eb 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 @@ -41,8 +41,6 @@ import java.util.Collections; import java.util.List; import java.util.Map; -import static org.jetbrains.jet.lang.resolve.calls.CallTransformer.CallForImplicitInvoke; - public class CallResolverUtil { public static final JetType DONT_CARE = ErrorUtils.createErrorTypeWithCustomDebugName("DONT_CARE"); @@ -61,7 +59,7 @@ public class CallResolverUtil { call.getReceiverArgument(), call.getExplicitReceiverKind(), call.isSafeCall()); - ResolvedCallImpl copy = ResolvedCallImpl.create(candidate, TraceUtil.DELEGATING_TRACE_STUB, call.getTracing()); + ResolvedCallImpl copy = ResolvedCallImpl.create(candidate, TraceUtil.DELEGATING_TRACE_STUB, call.getTracing(), call.getDataFlowInfoForArguments()); context.trace.record(BindingContext.RESOLVED_CALL, context.call.getCalleeExpression(), copy); copy.addStatus(call.getStatus()); @@ -76,7 +74,6 @@ public class CallResolverUtil { for (Map.Entry entry : call.getValueArguments().entrySet()) { copy.recordValueArgument(entry.getKey(), entry.getValue()); } - copy.setInitialDataFlowInfo(call.getDataFlowInfo()); return copy; } 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 2b63eb07847..8349fb53442 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 @@ -68,9 +68,9 @@ public class CallTransformer { @NotNull public Collection> createCallContexts(@NotNull ResolutionCandidate candidate, @NotNull ResolutionTask task, - @NotNull TemporaryBindingTrace candidateTrace) { - - ResolvedCallImpl candidateCall = ResolvedCallImpl.create(candidate, candidateTrace, task.tracing); + @NotNull TemporaryBindingTrace candidateTrace + ) { + ResolvedCallImpl candidateCall = ResolvedCallImpl.create(candidate, candidateTrace, task.tracing, task.dataFlowInfoForArguments); return Collections.singleton(CallCandidateResolutionContext.create(candidateCall, task, candidateTrace, task.tracing)); } @@ -81,8 +81,8 @@ public class CallTransformer { @NotNull public Collection> transformCall(@NotNull CallCandidateResolutionContext callCandidateResolutionContext, @NotNull CallResolver callResolver, - @NotNull ResolutionTask task) { - + @NotNull ResolutionTask task + ) { return Collections.singleton((ResolvedCallWithTrace) callCandidateResolutionContext.candidateCall); } @@ -105,7 +105,7 @@ public class CallTransformer { Call variableCall = stripCallArguments(task); if (!hasReceiver) { CallCandidateResolutionContext context = CallCandidateResolutionContext.create( - ResolvedCallImpl.create(candidate, candidateTrace, task.tracing), task, candidateTrace, task.tracing, variableCall); + ResolvedCallImpl.create(candidate, candidateTrace, task.tracing, task.dataFlowInfoForArguments), task, candidateTrace, task.tracing, variableCall); return Collections.singleton(context); } Call variableCallWithoutReceiver = stripReceiver(variableCall); @@ -127,7 +127,7 @@ public class CallTransformer { Call call, TemporaryBindingTrace temporaryTrace, ResolutionTask task) { ChainedTemporaryBindingTrace chainedTrace = ChainedTemporaryBindingTrace.create(temporaryTrace, "chained trace to resolve candidate", candidate); - ResolvedCallImpl resolvedCall = ResolvedCallImpl.create(candidate, chainedTrace, task.tracing); + ResolvedCallImpl resolvedCall = ResolvedCallImpl.create(candidate, chainedTrace, task.tracing, task.dataFlowInfoForArguments); return CallCandidateResolutionContext.create(resolvedCall, task, chainedTrace, task.tracing, call); } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CandidateResolver.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CandidateResolver.java index 83ee4713460..62f7d6f7f27 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CandidateResolver.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CandidateResolver.java @@ -31,6 +31,7 @@ import org.jetbrains.jet.lang.resolve.*; import org.jetbrains.jet.lang.resolve.calls.autocasts.*; import org.jetbrains.jet.lang.resolve.calls.context.*; import org.jetbrains.jet.lang.resolve.calls.inference.*; +import org.jetbrains.jet.lang.resolve.calls.model.MutableDataFlowInfoForArguments; import org.jetbrains.jet.lang.resolve.calls.model.ResolvedCall; import org.jetbrains.jet.lang.resolve.calls.model.ResolvedCallImpl; import org.jetbrains.jet.lang.resolve.calls.model.ResolvedValueArgument; @@ -418,7 +419,7 @@ public class CandidateResolver { } return; } - DataFlowInfo dataFlowInfoForValueArgument = context.candidateCall.getDataFlowInfoForValueArgument(argument); + DataFlowInfo dataFlowInfoForValueArgument = context.candidateCall.getDataFlowInfoForArguments().getInfo(argument); ResolutionContext newContext = context.replaceExpectedType(context.expectedType); if (dataFlowInfoForValueArgument != null) { newContext = newContext.replaceDataFlowInfo(dataFlowInfoForValueArgument); @@ -663,6 +664,7 @@ public class CandidateResolver { @NotNull CallResolverUtil.ResolveArgumentsMode resolveFunctionArgumentBodies) { ResolutionStatus resultStatus = SUCCESS; List argumentTypes = Lists.newArrayList(); + MutableDataFlowInfoForArguments infoForArguments = candidateCall.getDataFlowInfoForArguments(); for (Map.Entry entry : candidateCall.getValueArguments().entrySet()) { ValueParameterDescriptor parameterDescriptor = entry.getKey(); ResolvedValueArgument resolvedArgument = entry.getValue(); @@ -676,13 +678,13 @@ public class CandidateResolver { if (TypeUtils.dependsOnTypeParameters(expectedType, candidateCall.getCandidateDescriptor().getTypeParameters())) { expectedType = NO_EXPECTED_TYPE; } - candidateCall.setDataFlowInfoForArgument(argument, candidateCall.getDataFlowInfo()); - CallResolutionContext newContext = context.replaceDataFlowInfo(candidateCall.getDataFlowInfo()).replaceBindingTrace(trace) - .replaceExpectedType(expectedType); + + CallResolutionContext newContext = context.replaceDataFlowInfo(infoForArguments.getInfo(argument)) + .replaceBindingTrace(trace).replaceExpectedType(expectedType); JetTypeInfo typeInfoForCall = argumentTypeResolver.getArgumentTypeInfo( expression, newContext, resolveFunctionArgumentBodies, null); JetType type = typeInfoForCall.getType(); - candidateCall.addDataFlowInfo(typeInfoForCall.getDataFlowInfo()); + infoForArguments.updateInfo(argument, typeInfoForCall.getDataFlowInfo()); if (type == null || (ErrorUtils.isErrorType(type) && type != PLACEHOLDER_FUNCTION_TYPE)) { candidateCall.argumentHasNoType(); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/context/CallResolutionContext.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/context/CallResolutionContext.java index 0fc76ad11bc..b45d6f19b0d 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/context/CallResolutionContext.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/context/CallResolutionContext.java @@ -20,12 +20,15 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.jet.lang.psi.Call; import org.jetbrains.jet.lang.resolve.BindingTrace; import org.jetbrains.jet.lang.resolve.calls.autocasts.DataFlowInfo; +import org.jetbrains.jet.lang.resolve.calls.model.DataFlowInfoForArgumentsImpl; +import org.jetbrains.jet.lang.resolve.calls.model.MutableDataFlowInfoForArguments; import org.jetbrains.jet.lang.resolve.scopes.JetScope; import org.jetbrains.jet.lang.types.JetType; public abstract class CallResolutionContext> extends ResolutionContext { public final Call call; public final CheckValueArgumentsMode checkArguments; + public final MutableDataFlowInfoForArguments dataFlowInfoForArguments; protected CallResolutionContext( @NotNull BindingTrace trace, @@ -41,6 +44,12 @@ public abstract class CallResolutionContext infoMap = Maps.newHashMap(); + private final Map nextArgument = Maps.newHashMap(); + private DataFlowInfo initialInfo; + private DataFlowInfo resultInfo; + + public DataFlowInfoForArgumentsImpl(@NotNull Call call) { + this.call = call; + initNextArgMap(call.getValueArguments()); + } + + private void initNextArgMap(@NotNull List valueArguments) { + Iterator iterator = valueArguments.iterator(); + ValueArgument prev = null; + while (iterator.hasNext()) { + ValueArgument argument = iterator.next(); + if (prev != null) { + nextArgument.put(prev, argument); + } + prev = argument; + } + } + + @Override + public void setInitialDataFlowInfo(@NotNull DataFlowInfo dataFlowInfo) { + //TODO assert initialInfo == null + initialInfo = dataFlowInfo; + } + + @NotNull + @Override + public DataFlowInfo getInfo(@NotNull ValueArgument valueArgument) { + DataFlowInfo infoForArgument = infoMap.get(valueArgument); + if (infoForArgument == null) { + return initialInfo; + } + return initialInfo.and(infoForArgument); + } + + @Override + public void updateInfo(@NotNull ValueArgument valueArgument, @NotNull DataFlowInfo dataFlowInfo) { + ValueArgument next = nextArgument.get(valueArgument); + if (next != null) { + infoMap.put(next, dataFlowInfo); + return; + } + //TODO assert resultInfo == null + resultInfo = dataFlowInfo; + } + + @NotNull + @Override + public DataFlowInfo getResultInfo() { + if (resultInfo == null) return initialInfo; + assert initialInfo != null : "Initial data flow info was not set for call: " + call; + return initialInfo.and(resultInfo); + } +} diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/model/DelegatingResolvedCall.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/model/DelegatingResolvedCall.java index b84f4f35441..a23b1fe31df 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/model/DelegatingResolvedCall.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/model/DelegatingResolvedCall.java @@ -17,12 +17,9 @@ package org.jetbrains.jet.lang.resolve.calls.model; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.lang.descriptors.CallableDescriptor; import org.jetbrains.jet.lang.descriptors.TypeParameterDescriptor; import org.jetbrains.jet.lang.descriptors.ValueParameterDescriptor; -import org.jetbrains.jet.lang.psi.ValueArgument; -import org.jetbrains.jet.lang.resolve.calls.autocasts.DataFlowInfo; import org.jetbrains.jet.lang.resolve.calls.tasks.ExplicitReceiverKind; import org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverValue; import org.jetbrains.jet.lang.types.JetType; @@ -85,16 +82,10 @@ public abstract class DelegatingResolvedCall imple return resolvedCall.getTypeArguments(); } - @Nullable - @Override - public DataFlowInfo getDataFlowInfoForValueArgument(@NotNull ValueArgument valueArgument) { - return resolvedCall.getDataFlowInfoForValueArgument(valueArgument); - } - @NotNull @Override - public DataFlowInfo getDataFlowInfo() { - return resolvedCall.getDataFlowInfo(); + public DataFlowInfoForArguments getDataFlowInfoForArguments() { + return resolvedCall.getDataFlowInfoForArguments(); } @Override diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/model/MutableDataFlowInfoForArguments.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/model/MutableDataFlowInfoForArguments.java new file mode 100644 index 00000000000..3cd579cdb41 --- /dev/null +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/model/MutableDataFlowInfoForArguments.java @@ -0,0 +1,40 @@ +package org.jetbrains.jet.lang.resolve.calls.model; + +import org.jetbrains.annotations.NotNull; +import org.jetbrains.jet.lang.psi.ValueArgument; +import org.jetbrains.jet.lang.resolve.calls.autocasts.DataFlowInfo; + +public interface MutableDataFlowInfoForArguments extends DataFlowInfoForArguments { + + void setInitialDataFlowInfo(@NotNull DataFlowInfo dataFlowInfo); + + void updateInfo(@NotNull ValueArgument valueArgument, @NotNull DataFlowInfo dataFlowInfo); + + MutableDataFlowInfoForArguments WITHOUT_ARGUMENTS_CHECK = new MutableDataFlowInfoForArguments() { + private DataFlowInfo dataFlowInfo; + + @Override + public void setInitialDataFlowInfo(@NotNull DataFlowInfo dataFlowInfo) { + this.dataFlowInfo = dataFlowInfo; + } + + @Override + public void updateInfo( + @NotNull ValueArgument valueArgument, @NotNull DataFlowInfo dataFlowInfo + ) { + throw new IllegalStateException(); + } + + @NotNull + @Override + public DataFlowInfo getInfo(@NotNull ValueArgument valueArgument) { + throw new IllegalStateException(); + } + + @NotNull + @Override + public DataFlowInfo getResultInfo() { + return dataFlowInfo; + } + }; +} diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/model/ResolvedCall.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/model/ResolvedCall.java index d225e18df8a..ff23b6754c7 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/model/ResolvedCall.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/model/ResolvedCall.java @@ -59,15 +59,12 @@ public interface ResolvedCall { @NotNull List getValueArgumentsByIndex(); - @Nullable - DataFlowInfo getDataFlowInfoForValueArgument(@NotNull ValueArgument valueArgument); - /** What's substituted for type parameters */ @NotNull Map getTypeArguments(); @NotNull - DataFlowInfo getDataFlowInfo(); + DataFlowInfoForArguments getDataFlowInfoForArguments(); boolean isSafeCall(); } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/model/ResolvedCallImpl.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/model/ResolvedCallImpl.java index 4a7204e9bc1..c64ddafae6d 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/model/ResolvedCallImpl.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/model/ResolvedCallImpl.java @@ -22,17 +22,15 @@ import com.intellij.util.Function; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.lang.descriptors.CallableDescriptor; -import org.jetbrains.jet.lang.descriptors.FunctionDescriptor; import org.jetbrains.jet.lang.descriptors.TypeParameterDescriptor; import org.jetbrains.jet.lang.descriptors.ValueParameterDescriptor; import org.jetbrains.jet.lang.psi.ValueArgument; -import org.jetbrains.jet.lang.resolve.*; +import org.jetbrains.jet.lang.resolve.DelegatingBindingTrace; import org.jetbrains.jet.lang.resolve.calls.autocasts.DataFlowInfo; -import org.jetbrains.jet.lang.resolve.calls.context.CallCandidateResolutionContext; +import org.jetbrains.jet.lang.resolve.calls.inference.ConstraintSystem; +import org.jetbrains.jet.lang.resolve.calls.results.ResolutionStatus; import org.jetbrains.jet.lang.resolve.calls.tasks.ExplicitReceiverKind; import org.jetbrains.jet.lang.resolve.calls.tasks.ResolutionCandidate; -import org.jetbrains.jet.lang.resolve.calls.results.ResolutionStatus; -import org.jetbrains.jet.lang.resolve.calls.inference.ConstraintSystem; import org.jetbrains.jet.lang.resolve.calls.tasks.TracingStrategy; import org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverValue; import org.jetbrains.jet.lang.types.JetType; @@ -61,9 +59,13 @@ public class ResolvedCallImpl implements ResolvedC }; @NotNull - public static ResolvedCallImpl create(@NotNull ResolutionCandidate candidate, @NotNull DelegatingBindingTrace trace, - @NotNull TracingStrategy tracing) { - return new ResolvedCallImpl(candidate, trace, tracing); + public static ResolvedCallImpl create( + @NotNull ResolutionCandidate candidate, + @NotNull DelegatingBindingTrace trace, + @NotNull TracingStrategy tracing, + @NotNull MutableDataFlowInfoForArguments dataFlowInfoForArguments + ) { + return new ResolvedCallImpl(candidate, trace, tracing, dataFlowInfoForArguments); } private final D candidateDescriptor; @@ -75,17 +77,22 @@ public class ResolvedCallImpl implements ResolvedC private final Map typeArguments = Maps.newLinkedHashMap(); private final Map valueArguments = Maps.newLinkedHashMap(); + private final MutableDataFlowInfoForArguments dataFlowInfoForArguments; private final Set unmappedArguments = Sets.newLinkedHashSet(); - private final Map dataFlowInfoForArguments = Maps.newHashMap(); + private boolean someArgumentHasNoType = false; private final DelegatingBindingTrace trace; private final TracingStrategy tracing; private ResolutionStatus status = UNKNOWN_STATUS; private boolean hasUnknownTypeParameters = false; private ConstraintSystem constraintSystem = null; - private DataFlowInfo dataFlowInfo; - private ResolvedCallImpl(@NotNull ResolutionCandidate candidate, @NotNull DelegatingBindingTrace trace, @NotNull TracingStrategy tracing) { + private ResolvedCallImpl( + @NotNull ResolutionCandidate candidate, + @NotNull DelegatingBindingTrace trace, + @NotNull TracingStrategy tracing, + @NotNull MutableDataFlowInfoForArguments dataFlowInfoForArguments + ) { this.candidateDescriptor = candidate.getDescriptor(); this.thisObject = candidate.getThisObject(); this.receiverArgument = candidate.getReceiverArgument(); @@ -93,6 +100,7 @@ public class ResolvedCallImpl implements ResolvedC this.isSafeCall = candidate.isSafeCall(); this.trace = trace; this.tracing = tracing; + this.dataFlowInfoForArguments = dataFlowInfoForArguments; } @Override @@ -258,30 +266,14 @@ public class ResolvedCallImpl implements ResolvedC return isSafeCall; } + public void setInitialDataFlowInfo(@NotNull DataFlowInfo info) { + dataFlowInfoForArguments.setInitialDataFlowInfo(info); + } + @NotNull @Override - public DataFlowInfo getDataFlowInfo() { - return dataFlowInfo; - } - - @Override - @Nullable - public DataFlowInfo getDataFlowInfoForValueArgument(@NotNull ValueArgument valueArgument) { - return dataFlowInfoForArguments.get(valueArgument); - } - - public void setInitialDataFlowInfo(@NotNull DataFlowInfo info) { - assert dataFlowInfo == null; - dataFlowInfo = info; - } - - public void setDataFlowInfoForArgument(@NotNull ValueArgument valueArgument, @NotNull DataFlowInfo info) { - dataFlowInfoForArguments.put(valueArgument, info); - } - - public void addDataFlowInfo(@NotNull DataFlowInfo info) { - assert dataFlowInfo != null; - dataFlowInfo = dataFlowInfo.and(info); + public MutableDataFlowInfoForArguments getDataFlowInfoForArguments() { + return dataFlowInfoForArguments; } @NotNull diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/model/VariableAsFunctionResolvedCall.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/model/VariableAsFunctionResolvedCall.java index e1427c37fd1..75856d8f0ba 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/model/VariableAsFunctionResolvedCall.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/model/VariableAsFunctionResolvedCall.java @@ -17,14 +17,11 @@ package org.jetbrains.jet.lang.resolve.calls.model; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.lang.descriptors.FunctionDescriptor; import org.jetbrains.jet.lang.descriptors.TypeParameterDescriptor; import org.jetbrains.jet.lang.descriptors.ValueParameterDescriptor; import org.jetbrains.jet.lang.descriptors.VariableDescriptor; -import org.jetbrains.jet.lang.psi.ValueArgument; import org.jetbrains.jet.lang.resolve.DelegatingBindingTrace; -import org.jetbrains.jet.lang.resolve.calls.autocasts.DataFlowInfo; import org.jetbrains.jet.lang.resolve.calls.tasks.ExplicitReceiverKind; import org.jetbrains.jet.lang.resolve.calls.results.ResolutionStatus; import org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverValue; @@ -99,18 +96,6 @@ public class VariableAsFunctionResolvedCall implements ResolvedCallWithTrace getCallToCompleteTypeArgumentInference() { return functionCall.getCallToCompleteTypeArgumentInference(); } + + @NotNull + @Override + public DataFlowInfoForArguments getDataFlowInfoForArguments() { + return functionCall.getDataFlowInfoForArguments(); + } } diff --git a/js/js.translator/src/org/jetbrains/k2js/translate/reference/CallBuilder.java b/js/js.translator/src/org/jetbrains/k2js/translate/reference/CallBuilder.java index 98267bb48be..d6d3a4f11ae 100644 --- a/js/js.translator/src/org/jetbrains/k2js/translate/reference/CallBuilder.java +++ b/js/js.translator/src/org/jetbrains/k2js/translate/reference/CallBuilder.java @@ -24,6 +24,7 @@ import org.jetbrains.jet.lang.descriptors.CallableDescriptor; import org.jetbrains.jet.lang.resolve.BindingTraceContext; import org.jetbrains.jet.lang.resolve.DescriptorUtils; import org.jetbrains.jet.lang.resolve.TemporaryBindingTrace; +import org.jetbrains.jet.lang.resolve.calls.model.MutableDataFlowInfoForArguments; import org.jetbrains.jet.lang.resolve.calls.tasks.ExplicitReceiverKind; import org.jetbrains.jet.lang.resolve.calls.tasks.ResolutionCandidate; import org.jetbrains.jet.lang.resolve.calls.model.ResolvedCall; @@ -110,7 +111,8 @@ public final class CallBuilder { DescriptorUtils.safeGetValue(descriptor.getReceiverParameter()), ExplicitReceiverKind.THIS_OBJECT, false), TemporaryBindingTrace.create(new BindingTraceContext(), "trace to resolve call (in js)"), - TracingStrategy.EMPTY); + TracingStrategy.EMPTY, + MutableDataFlowInfoForArguments.WITHOUT_ARGUMENTS_CHECK); } if (descriptor == null) { descriptor = resolvedCall.getCandidateDescriptor().getOriginal();