Substitute CALLABLE_REFERENCE slice with FUNCTION one

This commit is contained in:
Mikhael Bogdanov
2013-09-18 15:42:10 +04:00
parent 59c04bd4cf
commit 0486e6cf4c
3 changed files with 2 additions and 3 deletions
@@ -2426,7 +2426,7 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> implem
@Override
public StackValue visitCallableReferenceExpression(JetCallableReferenceExpression expression, StackValue data) {
// TODO: properties
final FunctionDescriptor functionDescriptor = bindingContext.get(CALLABLE_REFERENCE, expression);
final FunctionDescriptor functionDescriptor = bindingContext.get(FUNCTION, expression);
assert functionDescriptor != null : "Callable reference is not resolved to descriptor: " + expression.getText();
final ResolvedCall<? extends CallableDescriptor> resolvedCall = bindingContext.get(RESOLVED_CALL, expression.getCallableReference());
@@ -260,7 +260,7 @@ class CodegenAnnotatingVisitor extends JetVisitorVoid {
@Override
public void visitCallableReferenceExpression(JetCallableReferenceExpression expression) {
FunctionDescriptor functionDescriptor = bindingContext.get(CALLABLE_REFERENCE, expression);
FunctionDescriptor functionDescriptor = bindingContext.get(FUNCTION, expression);
// working around a problem with shallow analysis
if (functionDescriptor == null) return;
@@ -515,7 +515,6 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
FunctionDescriptorUtil.initializeFromFunctionType(functionDescriptor, type, null, Modality.FINAL, Visibilities.PUBLIC);
context.trace.record(CALLABLE_REFERENCE, expression, functionDescriptor);
context.trace.record(FUNCTION, expression, functionDescriptor);
return type;