PsiType (@NotNull PsiWildcardType wildcardType) { final PsiType bound = wildcardType.getBound(); if (bound == null) { return wildcardType; } else { final PsiType newBound = bound.accept(this); if (newBound == null) { return null; } assert newBound.isValid() : newBound.getClass() + "; " + bound.isValid(); if (newBound instanceof PsiWildcardType) { final PsiType newBoundBound = ((PsiWildcardType)newBound).getBound(); return !((PsiWildcardType)newBound).isBounded() ? PsiWildcardType.createUnbounded(wildcardType.getManager()) : rebound(wildcardType, newBoundBound); } return newBound == PsiTypes.nullType() ? newBound : rebound(wildcardType, newBound); } }