Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clojure-add-arity severs arglist metadata #649

Open
loganlinn opened this issue May 7, 2023 · 0 comments
Open

clojure-add-arity severs arglist metadata #649

loganlinn opened this issue May 7, 2023 · 0 comments
Labels

Comments

@loganlinn
Copy link

loganlinn commented May 7, 2023

Expected behavior

Invoking clojure-add-arity in a single-arity function with metadata on the arglist should result in a function that still has that arglist meta.

For example, if I have

(defn string
  ^String
  [x]
  (str x))

After clojure-add-arity, I should have

(defn string
  ([])
  (^String [x]
   (str x)))

Actual behavior

New airty is added between metadata and the existing arglist, consequently moving the metadata off the original arglist. The metadata is no longer meaningful.

(defn string
  ^String
  ([])
  ([x]
   (str x)))

Steps to reproduce the problem

Invoke clojure-add-arity at any point in a single-arity function with metadata on the arglist.

Environment & Version information

clojure-mode version

5.16.0

Emacs version

GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars)

Operating system

NixOS 23.05

@bbatsov bbatsov added the bug label Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants