private static void setDegree(final Set<PsiTypeVariable> set,
                                Object2IntMap<PsiTypeVariable> result) {
    for (PsiTypeVariable var : set) {
      result.mergeInt(var, 1, Math::addExact);
    }
  }
private static void setDegree(final Set<PsiTypeVariable> set,
                                Object2IntMap<PsiTypeVariable> result)