@VisibleForTesting
  public @NotNull PsiType getType() {
    PsiManager manager = myNavigationElement.getManager();
    PsiType type = RecursionManager.doPreventingRecursion(this, true, () -> {
      PsiType res = null;

      for (GrExpression expression : myExpressions) {
        if (expression == null) continue;

        res = TypesUtil.getLeastUpperBoundNullable(res, expression.getType(), manager);
      }

      if (myExpressionsOfCollection != null) {
        for (GrExpression expression : myExpressionsOfCollection) {
          if (expression == null) continue;

          PsiType listType = expression.getType();
          PsiType type1 = PsiUtil.extractIterableTypeParameter(listType, true);

          if (type1 == null) {
            if (listType == null) continue;

            if (listType.equalsToText(CommonClassNames.JAVA_LANG_STRING)) {
              type1 = PsiType.getJavaLangString(expression.getManager(), expression.getResolveScope());
            }
          }

          res = TypesUtil.getLeastUpperBoundNullable(res, type1, manager);
        }
      }

      return res;
    });

    if (type == null) {
      return PsiType.getJavaLangObject(manager, myNavigationElement.getResolveScope());
    }
    else {
      return type;
    }
  }
@VisibleForTesting
  public @NotNull PsiType getType()