@Override
    public void visitMethodReferenceExpression(@NotNull PsiMethodReferenceExpression expression) {
      super.visitMethodReferenceExpression(expression);
      JavaResolveResult result = expression.advancedResolve(true);
      registerReference(expression, result);
      if (result.getElement() instanceof PsiMethod method) {
        for (PsiParameter parameter : method.getParameterList().getParameters()) {
          registerLocallyReferenced(parameter);
        }
      }
    }
@Override
    public void visitMethodReferenceExpression(@NotNull PsiMethodReferenceExpression expression)