@Override
    public void visitReferenceExpression(
      @NotNull PsiReferenceExpression expression) {
      super.visitReferenceExpression(expression);
      final PsiElement target = expression.resolve();
      if (!(target instanceof PsiVariable variable)) {
        return;
      }
      usedVariables.add(variable);
    }
@Override
    public void visitReferenceExpression(
      @NotNull PsiReferenceExpression expression)