fix inference for object type arg

This commit is contained in:
anna
2012-04-05 19:08:45 +02:00
parent 9242d62213
commit 27b6395f89
2 changed files with 12 additions and 1 deletions
@@ -466,7 +466,7 @@ public class PsiResolveHelperImpl implements PsiResolveHelper {
if (arg == null ||
arg.getDeepComponentType() instanceof PsiPrimitiveType ||
arg instanceof PsiIntersectionType ||
(psiClass != null && !CommonClassNames.JAVA_LANG_OBJECT.equals(psiClass.getQualifiedName()))) {
(psiClass != null && (isContraVariantPosition || !CommonClassNames.JAVA_LANG_OBJECT.equals(psiClass.getQualifiedName())))) {
PsiType bound = intersectAllExtends(typeParam, arg);
return new Pair<PsiType, ConstraintType>(bound, ConstraintType.SUPERTYPE);
}