result = new Pair<PsiType, ConstraintType>(superType, ConstraintType.SUBTYPE);
}
}
else {
PsiType guess = constraint.getFirst();
<BUG>if (guess == null) guess = TypeConversionUtil.typeParameterErasure(typeParameter);
if (forCompletion && guess != null && !(guess instanceof PsiWildcardType)) guess = PsiWildcardType.createExtends(manager, guess);
if (returnType instanceof PsiClassType && typeParameter.equals(((PsiClassType)returnType).resolve())) {</BUG>
PsiClassType[] extendsTypes = typeParameter.getExtendsListTypes();
PsiSubstitutor newSubstitutor = substitutor.put(typeParameter, guess);

result = new Pair<PsiType, ConstraintType>(superType, ConstraintType.SUBTYPE);
}
}
else {
PsiType guess = constraint.getFirst();
if (forCompletion && !(guess instanceof PsiWildcardType)) {
if (constraint.getSecond() == ConstraintType.SUPERTYPE) guess = PsiWildcardType.createExtends(manager, guess);
else if (constraint.getSecond() == ConstraintType.SUBTYPE) guess = PsiWildcardType.createSuper(manager, guess);
}
if (returnType instanceof PsiClassType && typeParameter.equals(((PsiClassType)returnType).resolve())) {
PsiClassType[] extendsTypes = typeParameter.getExtendsListTypes();
PsiSubstitutor newSubstitutor = substitutor.put(typeParameter, guess);
