Fixed checking reference target for constructors (to show something with green background)

This commit is contained in:
Alefas
2012-01-24 19:45:57 +04:00
parent d3a0b70acd
commit ffc6ffdb04
@@ -200,10 +200,9 @@ public class JetFunctionParameterInfoHandler implements
}
}
if (refExpression != null) {
ResolvedCall<? extends CallableDescriptor> call = bindingContext.get(BindingContext.RESOLVED_CALL, refExpression);
if (call != null) {
CallableDescriptor candidateDescriptor = call.getCandidateDescriptor();
if (candidateDescriptor == functionDescriptor) {
DeclarationDescriptor declarationDescriptor = bindingContext.get(BindingContext.REFERENCE_TARGET, refExpression);
if (declarationDescriptor != null) {
if (declarationDescriptor == functionDescriptor) {
color = GREEN_BACKGROUND;
}
}