PsiType (@NotNull List<PsiType> types, @NotNull PsiManager manager) { if (types.isEmpty()) return null; Iterator<PsiType> iterator = types.iterator(); PsiType accumulator = iterator.next(); while (iterator.hasNext()) { PsiType type = iterator.next(); accumulator = GenericsUtil.getLeastUpperBound(accumulator, type, manager); if (accumulator == null) return null; } return accumulator; }