ClojureScript

Spec instrumentation regression with varargs / :static-fns

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
  • Environment:
    1.10.439 (see repro)
  • Approval:
    Vetted

Description

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.

This is a regression relative to 1.10.339. See CLJS-2793.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: