Renamed method.

This commit is contained in:
Evgeny Gerashchenko
2013-04-10 15:39:16 +04:00
parent ebd72df058
commit 6285e5a9f4
3 changed files with 3 additions and 4 deletions
@@ -27,7 +27,6 @@ import org.jetbrains.jet.lang.psi.*;
import org.jetbrains.jet.lang.resolve.*;
import org.jetbrains.jet.lang.resolve.calls.autocasts.DataFlowInfo;
import org.jetbrains.jet.lang.resolve.calls.context.*;
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.ResolvedCallWithTrace;
import org.jetbrains.jet.lang.resolve.calls.results.*;
@@ -143,7 +142,7 @@ public class CallResolver {
JetSimpleNameExpression expression = (JetSimpleNameExpression) calleeExpression;
functionReference = expression;
ExpressionTypingUtils.checkWrappingInRef(expression, context.trace, context.scope);
ExpressionTypingUtils.checkCapturingInClosure(expression, context.trace, context.scope);
Name name = expression.getReferencedNameAsName();
@@ -73,7 +73,7 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
CallExpressionResolver callExpressionResolver = context.expressionTypingServices.getCallExpressionResolver();
JetTypeInfo typeInfo = callExpressionResolver.getSimpleNameExpressionTypeInfo(expression, NO_RECEIVER, null, context);
JetType type = DataFlowUtils.checkType(typeInfo.getType(), expression, context);
ExpressionTypingUtils.checkWrappingInRef(expression, context.trace, context.scope);
ExpressionTypingUtils.checkCapturingInClosure(expression, context.trace, context.scope);
return JetTypeInfo.create(type, typeInfo.getDataFlowInfo()); // TODO : Extensions to this
}
@@ -139,7 +139,7 @@ public class ExpressionTypingUtils {
).contains(expression.getNode().getElementType());
}
public static void checkWrappingInRef(JetSimpleNameExpression expression, BindingTrace trace, JetScope scope) {
public static void checkCapturingInClosure(JetSimpleNameExpression expression, BindingTrace trace, JetScope scope) {
VariableDescriptor variable = BindingContextUtils.extractVariableDescriptorIfAny(trace.getBindingContext(), expression, true);
if (variable != null) {
DeclarationDescriptor containingDeclaration = variable.getContainingDeclaration();