Setting :arglists metadata when vararg is present

Description

consider function with no parameters

All works as expected, but with the introduction of a vararg

:arglists does not get affected.

Environment

I'm running cljs 1.9.909 with figwheel and lumo 1.7, bug is present in both environments.

Activity

Show:
Hlöðver Sigurðsson
December 10, 2017, 2:54 AM

I just submitted a patch, never used jira patch system before, that aside, the patch will make the compiler respect :arglists metadata when the user provdes one. Hope to get feedback and merge on this

David Nolen
December 11, 2017, 2:53 PM

Thanks have you submitted your Clojure CA?

David Nolen
December 11, 2017, 2:56 PM

Patch review, I don't really understand the purpose the changing arity of variadic-fn and adding this new flag. Just put the logic directly into variadic-fn no?

Hlöðver Sigurðsson
December 11, 2017, 3:35 PM

Yes, I'll find a better solution to my patch, just that the `m` symbol in the let binding on line 3176

Merges the arglists and there's after this point no way to know if the :arglists came from a provided metadata or not. But I'll rename the let symbols and it's easy to avoid adding arity, I'll do another patch later today.

No haven't submitted my Clojure Contibutor Agreement, I'm filling it out now...

Hlöðver Sigurðsson
December 12, 2017, 7:48 PM

Yesterday I signed the Clojure CA
"Clojure CA between Rich Hickey and Hlöðver Sigurðsson is Signed and Filed!"

The code:
The symbol name m (for metadata) is already not very good, but I just added a comma to differentiate between vararg-fn case and the other cases.

I found as I was testing this that multi-arity-fn arglist metadata does not work with or without specifically adding arglists. If so, I can open another jira ticket for that.

Assignee

Unassigned

Reporter

Hlöðver Sigurðsson

Labels

Approval

Vetted

Patch

None

Affects versions

Priority

Minor
Configure