/** * If two bounds have the form α <: S and α <: T, and if for some generic class or interface, G, * there exists a supertype (4.10) of S of the form G<S1, ..., Sn> and a supertype of T of the * form G<T1, ..., Tn>, then for all i, 1 ≤ i ≤ n, if Si and Ti are types (not wildcards), the * constraint ⟨Si = Ti⟩ is implied. */ private boolean upUp(List<PsiType> upperBounds) { return InferenceSession.findParameterizationOfTheSameGenericClass( upperBounds, new Processor<Pair<PsiType, PsiType>>() { @Override public boolean process(Pair<PsiType, PsiType> pair) { final PsiType sType = pair.first; final PsiType tType = pair.second; if (!(sType instanceof PsiWildcardType) && !(tType instanceof PsiWildcardType) && sType != null && tType != null) { addConstraint(new TypeEqualityConstraint(sType, tType)); } return true; } }) != null; }