isReifiable should not check outer class type params for static inners

This commit is contained in:
anna
2012-10-04 17:21:05 +02:00
parent 0b4a8e2873
commit 77590cf807
2 changed files with 6 additions and 1 deletions
@@ -1167,7 +1167,7 @@ public class GenericsHighlightUtil {
return false;
}
if (parameters.length == 0) {
if (resolved != null) {
if (resolved != null && !resolved.hasModifierProperty(PsiModifier.STATIC)) {
final PsiClass containingClass = resolved.getContainingClass();
if (containingClass != null) {
final PsiTypeParameter[] containingClassTypeParameters = containingClass.getTypeParameters();
@@ -144,4 +144,9 @@ class Outer<E> {
final Inner[] i = <error descr="Generic array creation">new Inner[10]</error>;
class Inner {
}
}
class Outer1<E> {
final Inner[] i = new Inner[10];
static class Inner {
}
}