void (final Constraint constr) { final PsiType left = constr.getLeft(); final PsiType right = constr.getRight(); final Set<Constraint> addendumRise = new HashSet<>(); final Set<Constraint> addendumSink = new HashSet<>(); final Set<Constraint> addendumWcrd = new HashSet<>(); int numSons = 0; Binding riseBinding = myBindingFactory.rise(left, right, addendumRise); if (riseBinding != null) numSons++; Binding sinkBinding = myBindingFactory.sink(left, right, addendumSink); if (sinkBinding != null) numSons++; Binding wcrdBinding = mySettings.cookToWildcards() ? myBindingFactory.riseWithWildcard(left, right, addendumWcrd) : null; if (wcrdBinding != null) numSons++; Binding omitBinding = null; if (mySettings.exhaustive()) { final PsiClassType.ClassResolveResult rightResult = Util.resolveType(right); final PsiClassType.ClassResolveResult leftResult = Util.resolveType(left); final PsiClass rightClass = rightResult.getElement(); final PsiClass leftClass = leftResult.getElement(); if (rightClass != null && leftClass != null && rightClass.getManager().areElementsEquivalent(rightClass, leftClass)) { if (PsiUtil.typeParametersIterator(rightClass).hasNext()) { omitBinding = myBindingFactory.create(); numSons++; for (PsiType type : rightResult.getSubstitutor().getSubstitutionMap().values()) { if (! (type instanceof Bottom)) { numSons--; omitBinding = null; break; } } } } } if (numSons == 0) return; if ((riseBinding != null && sinkBinding != null && riseBinding.equals(sinkBinding)) || canBePruned(riseBinding)) { numSons--; sinkBinding = null; } if (riseBinding != null && wcrdBinding != null && riseBinding.equals(wcrdBinding)) { numSons--; wcrdBinding = null; } myConstraints.remove(constr); mySons = new ResolverTree[numSons]; int n = 0; if (riseBinding != null) { mySons[n++] = applyRule(riseBinding, addendumRise); } if (wcrdBinding != null) { mySons[n++] = applyRule(wcrdBinding, addendumWcrd); } if (omitBinding != null) { mySons[n++] = applyRule(omitBinding, addendumWcrd); } if (sinkBinding != null) { mySons[n++] = applyRule(sinkBinding, addendumSink); } }