PsiTypeParameter[] (PsiTypeParameter[] parameters, PsiType[] types) { Set<PsiTypeParameter> visited = new HashSet<>(); collectTypeParams(parameters, visited, types); return visited.toArray(PsiTypeParameter.EMPTY_ARRAY); }