boolean (Object o) { if (!(o instanceof PsiCapturedWildcardType)) { return false; } final PsiCapturedWildcardType captured = (PsiCapturedWildcardType)o; final PsiManager manager = myContext.getManager(); if (!manager.areElementsEquivalent(myContext, captured.myContext)) { return false; } if ((myExistential.isSuper() || captured.myExistential.isSuper()) && !myExistential.equals(captured.myExistential)) { return false; } if (!(myContext instanceof PsiTypeParameter) && !manager.areElementsEquivalent(myParameter, captured.myParameter)) { return false; } if (myParameter != null) { final Boolean sameUpperBounds = guard.doPreventingRecursion(myContext, true, () -> Comparing.equal(myUpperBound, captured.myUpperBound)); if (sameUpperBounds == null || sameUpperBounds) { return true; } } return myExistential.equals(captured.myExistential); }