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) { if (refExpression != null) {
ResolvedCall<? extends CallableDescriptor> call = bindingContext.get(BindingContext.RESOLVED_CALL, refExpression); DeclarationDescriptor declarationDescriptor = bindingContext.get(BindingContext.REFERENCE_TARGET, refExpression);
if (call != null) { if (declarationDescriptor != null) {
CallableDescriptor candidateDescriptor = call.getCandidateDescriptor(); if (declarationDescriptor == functionDescriptor) {
if (candidateDescriptor == functionDescriptor) {
color = GREEN_BACKGROUND; color = GREEN_BACKGROUND;
} }
} }