Instrumenting breaks function with varargs
Description
Environment
CLJS 1.10.238 (also reproducible in Lumo 1.9.0-alpha), 1.10.340
Attachments
Activity

Mike Fikes November 16, 2018 at 5:22 PM
Matt, this is a valid regression relative to 1.10.339. It should involve a new JIRA ticket.

Matthew Huebert November 16, 2018 at 5:19 PM
I am seeing some more unexpected behaviour with `instrument` and varargs, when `:static-fns` is enabled.
With the following repl:
```
clj -Srepro -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "1.10.439"} org.clojure/test.check {:mvn/version "RELEASE"}}}' -m cljs.main -co '{:static-fns true}' -re node -r
```
and code:
```
(require '[clojure.spec.alpha :as s])
(require '[clojure.spec.test.alpha :as st])
(defn defk
[key & [doc]]
key)
(s/fdef defk
:args (s/cat :key keyword?
:doc (s/? string?)))
(st/instrument)
(defk 1 1)
```
The last line should throw, but doesn't, if `:static-fns` is enabled.
David Nolen October 28, 2018 at 1:47 AM

Mike Fikes October 27, 2018 at 9:47 PM
CLJS-2793-2.patch passes f
and ret
into the macros (instead of employing ~'f
and ~'ret
).
David Nolen October 27, 2018 at 2:04 PM
First pass I think this looks ok, but lets just pass `ret` instead of capturing it in the macro. I had some trouble following at first because of that.
Details
Assignee
David NolenDavid NolenReporter
importimportPatch
Code and TestPriority
Blocker
Details
Details
Assignee
Reporter

Steps:
Actual:
Expected:
Couldn't reproduce in Clojure 1.9.0 and CLJS 1.9.946.