Removed unused methods
This commit is contained in:
@@ -82,13 +82,11 @@ public class CandidateResolver {
|
||||
|
||||
if (ErrorUtils.isError(candidate)) {
|
||||
candidateCall.addStatus(SUCCESS);
|
||||
markAllArgumentsAsUnmapped(context);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!checkOuterClassMemberIsAccessible(context)) {
|
||||
candidateCall.addStatus(OTHER_ERROR);
|
||||
markAllArgumentsAsUnmapped(context);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -105,7 +103,6 @@ public class CandidateResolver {
|
||||
ValueArgumentsToParametersMapper.Status argumentMappingStatus = ValueArgumentsToParametersMapper.mapValueArgumentsToParameters(
|
||||
context.call, context.tracing, candidateCall, unmappedArguments);
|
||||
if (!argumentMappingStatus.isSuccess()) {
|
||||
candidateCall.addUnmappedArguments(unmappedArguments);
|
||||
//For the expressions like '42.(f)()' where f: () -> Unit we'd like to generate an error 'no receiver admitted',
|
||||
//not to throw away the candidate.
|
||||
if (argumentMappingStatus == ValueArgumentsToParametersMapper.Status.STRONG_ERROR
|
||||
@@ -170,12 +167,6 @@ public class CandidateResolver {
|
||||
}
|
||||
}
|
||||
|
||||
private static void markAllArgumentsAsUnmapped(CallCandidateResolutionContext<?> context) {
|
||||
if (context.checkArguments == CheckValueArgumentsMode.ENABLED) {
|
||||
context.candidateCall.addUnmappedArguments(context.call.getValueArguments());
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean checkOuterClassMemberIsAccessible(@NotNull CallCandidateResolutionContext<?> context) {
|
||||
// In "this@Outer.foo()" the error will be reported on "this@Outer" instead
|
||||
if (context.call.getExplicitReceiver().exists() || context.call.getThisObject().exists()) return true;
|
||||
|
||||
-8
@@ -27,9 +27,6 @@ import org.jetbrains.jet.lang.resolve.calls.inference.ConstraintSystem;
|
||||
import org.jetbrains.jet.lang.resolve.calls.results.ResolutionStatus;
|
||||
import org.jetbrains.jet.lang.types.TypeSubstitutor;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Set;
|
||||
|
||||
public interface MutableResolvedCall<D extends CallableDescriptor> extends ResolvedCall<D> {
|
||||
|
||||
@NotNull
|
||||
@@ -68,11 +65,6 @@ public interface MutableResolvedCall<D extends CallableDescriptor> extends Resol
|
||||
|
||||
void recordArgumentMatch(@NotNull ValueArgument valueArgument, @NotNull ValueParameterDescriptor parameter, boolean hasTypeMismatch);
|
||||
|
||||
@NotNull
|
||||
Set<ValueArgument> getUnmappedArguments();
|
||||
|
||||
void addUnmappedArguments(@NotNull Collection<? extends ValueArgument> unmappedArguments);
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
MutableDataFlowInfoForArguments getDataFlowInfoForArguments();
|
||||
|
||||
-13
@@ -81,7 +81,6 @@ public class ResolvedCallImpl<D extends CallableDescriptor> implements MutableRe
|
||||
private final Map<TypeParameterDescriptor, JetType> typeArguments = Maps.newLinkedHashMap();
|
||||
private final Map<ValueParameterDescriptor, ResolvedValueArgument> valueArguments = Maps.newLinkedHashMap();
|
||||
private final MutableDataFlowInfoForArguments dataFlowInfoForArguments;
|
||||
private final Set<ValueArgument> unmappedArguments = Sets.newLinkedHashSet();
|
||||
private final Map<ValueArgument, ArgumentMatch> argumentToParameterMap = Maps.newHashMap();
|
||||
|
||||
private boolean someArgumentHasNoType = false;
|
||||
@@ -221,18 +220,6 @@ public class ResolvedCallImpl<D extends CallableDescriptor> implements MutableRe
|
||||
valueArguments.put(valueParameter, valueArgument);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addUnmappedArguments(@NotNull Collection<? extends ValueArgument> unmappedArguments) {
|
||||
this.unmappedArguments.addAll(unmappedArguments);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public Set<ValueArgument> getUnmappedArguments() {
|
||||
return unmappedArguments;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public ReceiverValue getReceiverArgument() {
|
||||
|
||||
Reference in New Issue
Block a user