Fixed completion of functions with implicit receiver.
This commit is contained in:
+2
-4
@@ -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
|
||||
*/
|
||||
Reference in New Issue
Block a user