void () { configure(); final Collection<PsiMethodCallExpression> methodCallExpressions = PsiTreeUtil.findChildrenOfType(getFile(), PsiMethodCallExpression.class); final PsiResolveHelper helper = JavaPsiFacade.getInstance(getProject()).getResolveHelper(); for (PsiMethodCallExpression expression : methodCallExpressions) { CandidateInfo[] candidates = helper.getReferencedMethodCandidates(expression, false, true); PsiExpressionList argumentList = expression.getArgumentList(); PsiExpression[] args = argumentList.getExpressions(); for (JavaResolveResult result : candidates) { if (result instanceof MethodCandidateInfo info) { MethodCandidateInfo.ourOverloadGuard .doPreventingRecursion(argumentList, false, () -> info.inferTypeArguments(DefaultParameterTypeInferencePolicy.INSTANCE, args, true)); } } PsiMethodCallExpression parentCall = PsiTreeUtil.getParentOfType(expression, PsiMethodCallExpression.class, true); if (parentCall != null) { JavaResolveResult result = parentCall.getMethodExpression().advancedResolve(false); if (result instanceof MethodCandidateInfo) { assertNull(((MethodCandidateInfo)result).getInferenceErrorMessage()); } } } }