private static void flatten(Set<? super PsiType> disjunctions, PsiType type) {
    if (type instanceof PsiDisjunctionType) {
      for (PsiType child : ((PsiDisjunctionType)type).getDisjunctions()) {
        flatten(disjunctions, child);
      }
    } else {
      disjunctions.add(type);
    }

  }
private static void flatten(Set<? super PsiType> disjunctions, PsiType type)