rename SKIP_FUNCTION_ARGUMENTS -> SHAPE_FUNCTION_ARGUMENTS

This commit is contained in:
Svetlana Isakova
2013-10-16 17:12:13 +04:00
parent 14cff91fed
commit 31e9eb497f
3 changed files with 10 additions and 10 deletions
@@ -50,7 +50,7 @@ import java.util.Set;
import static org.jetbrains.jet.lang.resolve.BindingContextUtils.getRecordedTypeInfo;
import static org.jetbrains.jet.lang.resolve.calls.CallResolverUtil.ResolveArgumentsMode;
import static org.jetbrains.jet.lang.resolve.calls.CallResolverUtil.ResolveArgumentsMode.RESOLVE_FUNCTION_ARGUMENTS;
import static org.jetbrains.jet.lang.resolve.calls.CallResolverUtil.ResolveArgumentsMode.SKIP_FUNCTION_ARGUMENTS;
import static org.jetbrains.jet.lang.resolve.calls.CallResolverUtil.ResolveArgumentsMode.SHAPE_FUNCTION_ARGUMENTS;
import static org.jetbrains.jet.lang.types.TypeUtils.*;
public class ArgumentTypeResolver {
@@ -85,7 +85,7 @@ public class ArgumentTypeResolver {
}
public void checkTypesWithNoCallee(@NotNull CallResolutionContext<?> context) {
checkTypesWithNoCallee(context, SKIP_FUNCTION_ARGUMENTS);
checkTypesWithNoCallee(context, SHAPE_FUNCTION_ARGUMENTS);
}
public void checkTypesWithNoCallee(@NotNull CallResolutionContext<?> context, @NotNull ResolveArgumentsMode resolveFunctionArgumentBodies) {
@@ -224,7 +224,7 @@ public class ArgumentTypeResolver {
@NotNull CallResolutionContext<?> context,
@NotNull ResolveArgumentsMode resolveArgumentsMode
) {
if (resolveArgumentsMode == SKIP_FUNCTION_ARGUMENTS) {
if (resolveArgumentsMode == SHAPE_FUNCTION_ARGUMENTS) {
JetType type = getShapeTypeOfFunctionLiteral(functionLiteralExpression, context.scope, context.trace, true);
return JetTypeInfo.create(type, context.dataFlowInfo);
}
@@ -281,7 +281,7 @@ public class ArgumentTypeResolver {
if (expression == null) continue;
CallResolutionContext<?> newContext = context.replaceDataFlowInfo(infoForArguments.getInfo(argument));
JetTypeInfo typeInfoForCall = getArgumentTypeInfo(expression, newContext, SKIP_FUNCTION_ARGUMENTS);
JetTypeInfo typeInfoForCall = getArgumentTypeInfo(expression, newContext, SHAPE_FUNCTION_ARGUMENTS);
infoForArguments.updateInfo(argument, typeInfoForCall.getDataFlowInfo());
}
}
@@ -47,7 +47,7 @@ import static org.jetbrains.jet.lang.types.TypeUtils.DONT_CARE;
public class CallResolverUtil {
public static enum ResolveArgumentsMode {
RESOLVE_FUNCTION_ARGUMENTS,
SKIP_FUNCTION_ARGUMENTS
SHAPE_FUNCTION_ARGUMENTS
}
private CallResolverUtil() {}
@@ -54,7 +54,7 @@ import java.util.*;
import static org.jetbrains.jet.lang.diagnostics.Errors.PROJECTION_ON_NON_CLASS_TYPE_ARGUMENT;
import static org.jetbrains.jet.lang.diagnostics.Errors.SUPER_IS_NOT_AN_EXPRESSION;
import static org.jetbrains.jet.lang.resolve.calls.CallResolverUtil.ResolveArgumentsMode.RESOLVE_FUNCTION_ARGUMENTS;
import static org.jetbrains.jet.lang.resolve.calls.CallResolverUtil.ResolveArgumentsMode.SKIP_FUNCTION_ARGUMENTS;
import static org.jetbrains.jet.lang.resolve.calls.CallResolverUtil.ResolveArgumentsMode.SHAPE_FUNCTION_ARGUMENTS;
import static org.jetbrains.jet.lang.resolve.calls.CallTransformer.CallForImplicitInvoke;
import static org.jetbrains.jet.lang.resolve.calls.context.ContextDependency.INDEPENDENT;
import static org.jetbrains.jet.lang.resolve.calls.results.ResolutionStatus.*;
@@ -128,7 +128,7 @@ public class CandidateResolver {
candidateCall.addStatus(status);
}
else {
candidateCall.addStatus(checkAllValueArguments(context, SKIP_FUNCTION_ARGUMENTS).status);
candidateCall.addStatus(checkAllValueArguments(context, SHAPE_FUNCTION_ARGUMENTS).status);
}
}
else {
@@ -153,7 +153,7 @@ public class CandidateResolver {
TypeSubstitutor substitutor = TypeSubstitutor.create(substitutionContext);
candidateCall.setResultingSubstitutor(substitutor);
candidateCall.addStatus(checkAllValueArguments(context, SKIP_FUNCTION_ARGUMENTS).status);
candidateCall.addStatus(checkAllValueArguments(context, SHAPE_FUNCTION_ARGUMENTS).status);
}
else {
candidateCall.addStatus(OTHER_ERROR);
@@ -557,7 +557,7 @@ public class CandidateResolver {
// We'll type check the arguments later, with the inferred types expected
boolean[] isErrorType = new boolean[1];
addConstraintForValueArgument(valueArgument, valueParameterDescriptor, substituteDontCare, constraintSystem,
context, isErrorType, SKIP_FUNCTION_ARGUMENTS);
context, isErrorType, SHAPE_FUNCTION_ARGUMENTS);
if (isErrorType[0]) {
candidateCall.argumentHasNoType();
}
@@ -594,7 +594,7 @@ public class CandidateResolver {
if (!hasContradiction) {
return INCOMPLETE_TYPE_INFERENCE;
}
ValueArgumentsCheckingResult checkingResult = checkAllValueArguments(context, SKIP_FUNCTION_ARGUMENTS);
ValueArgumentsCheckingResult checkingResult = checkAllValueArguments(context, SHAPE_FUNCTION_ARGUMENTS);
ResolutionStatus argumentsStatus = checkingResult.status;
return OTHER_ERROR.combine(argumentsStatus);
}