<< Back to previous view

[TCHECK-86] Eastwood gives bad-arglists warning for defspec Created: 20/Nov/15  Updated: 21/Nov/15

Status: Open
Project: test.check
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Atamert Ölçgen Assignee: Reid Draper
Resolution: Unresolved Votes: 0
Labels: None

org.clojure/clojure "1.7.0"
jonase/eastwood "0.2.1"
org.clojure/test.check "0.9.0"


Any spec gives the warning, just to illustrate:

(defspec bad-arglists
  (prop/for-all [i clojure.test.check.generators/int]
                (= (+ i i)
                   (* i 2))))

This is the actual warning message:

bad-arglists: Function on var bad-arglists defined taking # args [0 1 :or-more] but :arglists metadata has # args [0]

Comment by Gary Fredericks [ 20/Nov/15 10:10 PM ]

That's peculiar. The defspec macro doesn't do anything weird w.r.t. arglists, and I bet if you checked (-> #'bad-arglists meta :arglists) you wouldn't see anything strange.

At a glance I can't tell if this is test.check's fault or eastwood's.

Comment by Atamert Ölçgen [ 21/Nov/15 12:34 AM ]

Actually [] is there:

(-> #'bad-arglists meta :arglists)
;; => ([] [times & {:as quick-check-opts, :keys [seed max-size]}])

But I have just checked the source and arglists looks fine, the macro defines multiple arities.

I think this is not a test.check issue. It is already being discussed in eastwood#51. So I suggest closing this.

Generated at Thu Nov 26 19:14:49 CST 2015 using JIRA 4.4#649-r158309.