void (@NotNull PsiTypeElement typeElement) { if (!referencesStaticallyAccessible) { return; } super.visitTypeElement(typeElement); final PsiClass aClass = PsiUtil.resolveClassInClassTypeOnly(typeElement.getType()); if (aClass instanceof PsiTypeParameter && !PsiTreeUtil.isAncestor(innerClass, aClass, true)) { referencesStaticallyAccessible = false; } }