@Override
        public boolean isAcceptable(Object o, PsiElement context) {
          if (o instanceof CandidateInfo info) {
            final PsiElement member = info.getElement();

            if (expectedType.equals(PsiTypes.voidType())) {
              return member instanceof PsiMethod;
            }

            if (member instanceof PsiEnumConstant && used.contains(CompletionUtil.getOriginalOrSelf(member))) {
              return false;
            }

            return AssignableFromFilter.isAcceptable(member, element, expectedType, info.getSubstitutor());
          }
          return false;
        }
@Override
        public boolean isAcceptable(Object o, PsiElement context)