boolean (@NotNull PsiCall methodCall, @NotNull String errorMessage) { if (errorMessage.equals(JavaPsiBundle.message("error.incompatible.type.failed.to.resolve.argument"))) { PsiElement parent = PsiUtil.skipParenthesizedExprUp(methodCall.getParent()); if (parent instanceof PsiExpressionList) { PsiElement grandParent = parent.getParent(); if (grandParent instanceof PsiCallExpression) { JavaResolveResult parentResolveResult = ((PsiCallExpression)grandParent).resolveMethodGenerics(); if (parentResolveResult instanceof MethodCandidateInfo && ((MethodCandidateInfo)parentResolveResult).getInferenceErrorMessage() != null) { // Parent resolve failed as well, and it's likely more informative. // Suppress this error to allow reporting from parent return true; } } } } return false; }