boolean (@NotNull GrTypeDefinition grType, @NotNull PsiMember element, @NotNull PsiElement place) { return !grType.isTrait() || !element.hasModifierProperty(PsiModifier.STATIC) || grType.equals(element.getContainingClass()) && PsiTreeUtil.isAncestor(grType, place, true); }