Fixed completion of functions with implicit receiver.

This commit is contained in:
Alefas
2012-01-24 19:39:13 +04:00
parent 9246cd5b81
commit d3a0b70acd
4 changed files with 31 additions and 11 deletions
@@ -84,7 +84,7 @@ public class JetFunctionParameterInfoHandler implements
@Override
public Object[] getParametersForDocumentation(Object p, ParameterInfoContext context) {
return ArrayUtil.EMPTY_OBJECT_ARRAY; //todo:
return ArrayUtil.EMPTY_OBJECT_ARRAY; //todo: ?
}
@Override
@@ -203,9 +203,7 @@ public class JetFunctionParameterInfoHandler implements
ResolvedCall<? extends CallableDescriptor> call = bindingContext.get(BindingContext.RESOLVED_CALL, refExpression);
if (call != null) {
CallableDescriptor candidateDescriptor = call.getCandidateDescriptor();
PsiElement elem = bindingContext.get(BindingContext.DESCRIPTOR_TO_DECLARATION, candidateDescriptor);
PsiElement ourElem = bindingContext.get(BindingContext.DESCRIPTOR_TO_DECLARATION, functionDescriptor);
if (elem.equals(ourElem)) {
if (candidateDescriptor == functionDescriptor) {
color = GREEN_BACKGROUND;
}
}
@@ -9,5 +9,6 @@ class B(): A(5) {
}
}
/*
smth
Text: (x: Int), Disabled: true, Strikeout: false, Green: false
Text: (x: Int, y: Boolean), Disabled: false, Strikeout: false, Green: true
*/
@@ -9,6 +9,7 @@ class B(): A(5) {
}
}
/*
Text: (x: Int), Disabled: true, Strikeout: false, Green: false
Text: (x: Int, y: Boolean), Disabled: false, Strikeout: false, Green: true
Text: (x: Int, y: Boolean, z: String), Disabled: false, Strikeout: false, Green: false
smth
*/