(no message)

This commit is contained in:
Eugene Vigdorchik
2005-01-21 21:28:23 +03:00
parent 122be103a0
commit 00dd69384d
@@ -584,8 +584,24 @@ public class RefactoringUtil {
return type;
}
public PsiType visitWildcardType(final PsiWildcardType wildcardType) {
final PsiType bound = wildcardType.getBound();
PsiManager manager = wildcardType.getManager();
if (bound != null) {
final PsiType acceptedBound = bound.accept(this);
if (acceptedBound instanceof PsiWildcardType) {
if (((PsiWildcardType)acceptedBound).isExtends() != wildcardType.isExtends()) return PsiWildcardType.createUnbounded(manager);
return acceptedBound;
}
if (acceptedBound.equals(bound)) return wildcardType;
return wildcardType.isExtends() ? PsiWildcardType.createExtends(manager, acceptedBound) :
PsiWildcardType.createSuper(manager, acceptedBound);
}
return wildcardType;
}
public PsiType visitCapturedWildcardType(PsiCapturedWildcardType capturedWildcardType) {
return capturedWildcardType.getWildcard();
return capturedWildcardType.getWildcard().accept(this);
}
public PsiType visitClassType(PsiClassType classType) {