Renamed method.
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user