boolean (PsiWildcardType type, PsiType bound) { LOG.assertTrue(type.isExtends()); final PsiType extendsBound = type.getExtendsBound(); PsiType boundBound = bound; if (bound instanceof PsiWildcardType) { if (((PsiWildcardType)bound).isBounded()) { boundBound = ((PsiWildcardType)bound).isSuper() ? ((PsiWildcardType)bound).getSuperBound() : ((PsiWildcardType)bound).getExtendsBound(); } else { return false; } } final PsiClass extendsBoundClass = PsiUtil.resolveClassInClassTypeOnly(extendsBound); final PsiClass boundBoundClass = PsiUtil.resolveClassInClassTypeOnly(boundBound); if (boundBoundClass != null && extendsBoundClass != null && !boundBoundClass.isInterface() && !extendsBoundClass.isInterface()) { return !InheritanceUtil.isInheritorOrSelf(boundBoundClass, extendsBoundClass, true) && !InheritanceUtil.isInheritorOrSelf(extendsBoundClass, boundBoundClass, true); } return !TypeConversionUtil.areTypesConvertible(boundBound, extendsBound) && !TypeConversionUtil.areTypesConvertible(extendsBound, boundBound); }