Dealing with infix calls in completion

#KT-4846 Fixed
This commit is contained in:
Valentin Kipyatkov
2014-09-18 17:17:35 +04:00
committed by valentin
parent 9961a5ff16
commit 2bb553612c
23 changed files with 177 additions and 31 deletions
@@ -194,9 +194,15 @@ public class ExpressionTypingUtils {
public static boolean checkIsExtensionCallable (
@NotNull ReceiverValue receiverArgument,
@NotNull CallableDescriptor callableDescriptor,
boolean isInfixCall,
@NotNull BindingContext bindingContext,
@NotNull DataFlowInfo dataFlowInfo
) {
if (isInfixCall
&& (!(callableDescriptor instanceof SimpleFunctionDescriptor) || callableDescriptor.getValueParameters().size() != 1)) {
return false;
}
List<JetType> types = AutoCastUtils.getAutoCastVariants(receiverArgument, bindingContext, dataFlowInfo);
for (JetType type : types) {