public static boolean mayHaveUnknownTypeDueToPendingReference(@NotNull PsiExpression expression) {
    PsiType type = expression.getType();
    if (type != null && !(type instanceof PsiMethodReferenceType)) {
      return hasUnresolvedComponent(type);
    }
    expression = PsiUtil.skipParenthesizedExprDown(expression);
    if (expression instanceof PsiMethodCallExpression &&
        canBePendingReference(((PsiMethodCallExpression)expression).getMethodExpression())) {
      return true;
    }
    if (expression instanceof PsiReferenceExpression && canBePendingReference((PsiReferenceExpression)expression)) {
      return true;
    }
    if (expression instanceof PsiArrayAccessExpression) {
      return mayHaveUnknownTypeDueToPendingReference(((PsiArrayAccessExpression)expression).getArrayExpression());
    }
    return false;
  }
public static boolean mayHaveUnknownTypeDueToPendingReference(@NotNull PsiExpression expression)