private boolean changeConstExprentType(@NotNull VarVersionPair varVersion,
                                         @NotNull Exprent exprent,
                                         @NotNull VarType newType,
                                         boolean checkMinExprentType) {
    if (checkMinExprentType) {
      VarType currentMinType = minExprentTypes.get(varVersion);
      VarType newMinType;
      if (currentMinType == null || newType.getTypeFamily() > currentMinType.getTypeFamily()) {
        newMinType = newType;
      }
      else if (newType.getTypeFamily() < currentMinType.getTypeFamily()) {
        return true;
      }
      else {
        newMinType = VarType.getCommonSupertype(currentMinType, newType);
      }
      minExprentTypes.put(varVersion, newMinType);
      if (exprent.type == Exprent.EXPRENT_CONST) {
        ((ConstExprent)exprent).setConstType(newMinType);
      }
      return currentMinType == null ||
             (newMinType.getTypeFamily() <= currentMinType.getTypeFamily() && !newMinType.isStrictSuperset(currentMinType));
    }
    VarType currentMaxType = maxExprentTypes.get(varVersion);
    VarType newMaxType;
    if (currentMaxType == null || newType.getTypeFamily() < currentMaxType.getTypeFamily()) {
      newMaxType = newType;
    }
    else if (newType.getTypeFamily() > currentMaxType.getTypeFamily()) {
      return true;
    }
    else {
      newMaxType = VarType.getCommonMinType(currentMaxType, newType);
    }
    maxExprentTypes.put(varVersion, newMaxType);
    return true;
  }
private boolean changeConstExprentType(@NotNull VarVersionPair varVersion,
                                         @NotNull Exprent exprent,
                                         @NotNull VarType newType,
                                         boolean checkMinExprentType)